You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when i use vae.yaml,I get the error code:AttributeError: 'VAEDataset' object has no attribute '_has_setup_TrainerFn.FITTING,how to fix the problem?
PS:
pytorch_lightning==1.5.6
torch==2.0.1
The text was updated successfully, but these errors were encountered:
Maybe someone is still interested in this issue...
I use pytorch-lightning == 1.5.10. This works with Python 3.10.x but not with 3.11.x.
The problem is that Python 3.11 changed the way how Enums are formatted.
PyTorch-Lightning does the following:
name = "setup"
stage = TrainerFn.FITTING
attr = f"has{name}_{stage}"
has_run = getattr(obj, attr)
where TrainerFn is an Enum:
class TrainerFn(LightningEnum):
FITTING = "fit"
VALIDATING = "validate"
...
In Python 3.10.x this results in '_has_setup_fit'.
In Python >=3.11.0 this leads to '_has_setup_TrainerFn.FITTING'
when i use vae.yaml,I get the error code:AttributeError: 'VAEDataset' object has no attribute '_has_setup_TrainerFn.FITTING,how to fix the problem?
PS:
pytorch_lightning==1.5.6
torch==2.0.1
The text was updated successfully, but these errors were encountered: