Skip to content

object has no attribute '_is_compiled' #124

@kerrycobb

Description

@kerrycobb

When trying to run the DANN example from the API documentation with version 0.4.4 I encounter the error below. Version 0.4.3 does not produce this error, though.

from adapt.utils import make_classification_da
from adapt.feature_based import DANN

Xs, ys, Xt, yt = make_classification_da()
model = DANN(lambda_=0.1, Xt=Xt, metrics=["acc"], random_state=0)
model.fit(Xs, ys, epochs=100, verbose=0)
model.score(Xt, yt)
Traceback (most recent call last):
  File "/mnt/home/kc2824/test-adapt/test.py", line 9, in <module>
    model.fit(Xs, ys, epochs=100, verbose=0)
  File "/.../python3.12/site-packages/adapt/base.py", line 1147, in fit
    if (not self._is_compiled) or (self.pretrain_):
            ^^^^^^^^^^^^^^^^^
AttributeError: 'DANN' object has no attribute '_is_compiled'. Did you mean: '_jit_compile'?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions