Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'DataModuleFromConfig' object has no attribute '_has_setup_TrainerFn.FITTING' #75

Open
shazra-raza opened this issue Nov 3, 2023 · 0 comments

Comments

@shazra-raza
Copy link

I changed the requirements.txt to:
--extra-index-url https://download.pytorch.org/whl/cu113
torch==2.0
torchvision==0.15.1
albumentations>=0.4.3
opencv-python==4.5.5.64
pudb==2019.2
imageio==2.9.0
imageio-ffmpeg==0.4.2
pytorch-lightning==1.4.2
omegaconf==2.1.1
test-tube>=0.7.5
streamlit>=0.73.1
einops==0.3.0
torch-fidelity==0.3.0
transformers>=4.22.2
kornia==0.6
uvicorn==0.23.2
webdataset==0.2.5
torchmetrics==0.6.0
fire==0.4.0
dill>=0.3.6
gradio==3.1.4
diffusers==0.3.0
datasets[vision]>=2.4.0
-e git+https://github.com/CompVis/taming-transformers.git@master#egg=taming-transformers
-e git+https://github.com/openai/CLIP.git@main#egg=clip
-e git+https://github.com/justinpinkney/nomi.git@e9ded23b7e2269cc64d39683e1bf3c0319f552ab#egg=nomi
-e .

and now every time I run python main.py -t --base configs/stable-diffusion/pokemon.yaml --gpus="0," --scale_lr False --num_nodes 1 --check_val_every_n_epoch 10 --finetune_from /scratch/gpfs/sraza/stable-diffusion/models/ldm/stable-diffusion-v1/model.ckpt

I get the error message:

Summoning checkpoint.
Traceback (most recent call last):
File "/scratch/gpfs/sraza/fine-tuning/stable-diffusion/main.py", line 905, in
trainer.fit(model, data)
File "/home/sraza/.local/lib/python3.11/site-packages/pytorch_lightning/trainer/trainer.py", line 553, in fit
self._run(model)
File "/home/sraza/.local/lib/python3.11/site-packages/pytorch_lightning/trainer/trainer.py", line 865, in _run
self._call_setup_hook(model) # allow user to setup lightning_module in accelerator environment
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sraza/.local/lib/python3.11/site-packages/pytorch_lightning/trainer/trainer.py", line 1169, in _call_setup_hook
self.datamodule.setup(stage=fn)
File "/home/sraza/.local/lib/python3.11/site-packages/pytorch_lightning/core/datamodule.py", line 415, in wrapped_fn
has_run = getattr(obj, attr)
^^^^^^^^^^^^^^^^^^
AttributeError: 'DataModuleFromConfig' object has no attribute '_has_setup_TrainerFn.FITTING'

Does anyone know why this could be happening?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant