Closed tr4wzified closed 1 year ago
I managed to get it to work after using Pop OS (Linux) instead of Windows, not sure what this error was.
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'
Hello, I'm new to this whole fine-tuning thing but I'd like to give it try for another (C#) project I'm working on, hopefully integrate it in there. I'm following this tutorial (great write-up by the way!) but I'm having some issues trying to train my model. Here's the code I've got:
When starting to train the model I get the following error:
AttributeError: 'LightningDataModule' object has no attribute
'_has_setup_TrainerFn.FITTING'. Full stacktrace:I'm wondering if I've got some dependency issue, or am I doing something else wrong? I'm using Python 3.11.4 on Windows 11 64-bit.