Open Jarye0612 opened 12 months ago
Hi @Jarye0612,
I got the same error. Try to install the following configuration:
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