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

NameError: name 'trainer' is not defined #163

Closed
Stoops0311 opened this issue Mar 8, 2023 · 8 comments
Closed

NameError: name 'trainer' is not defined #163

Stoops0311 opened this issue Mar 8, 2023 · 8 comments

Comments

@Stoops0311
Copy link

Global seed set to 23
Traceback (most recent call last):
File "main.py", line 656, in
configs = [OmegaConf.load(cfg) for cfg in opt.base]
File "main.py", line 656, in
configs = [OmegaConf.load(cfg) for cfg in opt.base]
File "/opt/conda/lib/python3.7/site-packages/omegaconf/omegaconf.py", line 189, in load
with io.open(os.path.abspath(file_), "r", encoding="utf-8") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/workspace/Dreambooth-Stable-Diffusion/configs/stable-diffusion/v1-finetune_unfrozen_save_checkpoints_every_500_steps.yaml'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "main.py", line 932, in
if trainer.global_rank == 0:
NameError: name 'trainer' is not defined

@AmaruEscalante
Copy link

AmaruEscalante commented Mar 9, 2023

+1 Did you solve it?

@carlosvsm2
Copy link

I have the exact same issue with the NameError: name 'trainer' is not defined. I am hoping someone can help soon...

@AmaruEscalante
Copy link

AmaruEscalante commented Mar 10, 2023

Guys I found the solution. We aren't following the instructions on the readme well enough.

  1. Select Pytorch as your template

Screenshot 2023-03-10 at 00 51 16

2. Once you create it, edit the pod and remove all the versioning to just say `runpod/pytorch`, this I believe gets the latest version of the image, and voilá your code should run just fine.

Screenshot 2023-03-10 at 00 53 19

@Stoops0311
Copy link
Author

Guys I found the solution. We aren't following the instructions on the readme well enough.

  1. Select Pytorch as your template
Screenshot 2023-03-10 at 00 51 16
  1. Once you create it, edit the pod and remove all the versioning to just say runpod/pytorch, this I believe gets the latest version of the image, and voilá your code should run just fine.
Screenshot 2023-03-10 at 00 53 19

Nope sorry thats wrong, the problem i was having was becuase the repo itself was damaged it wasnt that we werent following the instructions i talked to the devs on discord they fixed the problem and changed some stuff, even the yaml script to save the models was missing before they fixed it dont worry but this is still a necessary step

@Stoops0311
Copy link
Author

if youre part of the server here is the link to the message and the changes they made

https://discord.com/channels/1023277529424986162/1026874778331643995/1083156685159415919

@WildDogOne
Copy link

god damn live saver right here :)
works like a charm

@AlexanderKozhevin
Copy link

+1, same

@elo0i
Copy link

elo0i commented Mar 31, 2023

Guys I found the solution. We aren't following the instructions on the readme well enough.

  1. Select Pytorch as your template
Screenshot 2023-03-10 at 00 51 16
  1. Once you create it, edit the pod and remove all the versioning to just say runpod/pytorch, this I believe gets the latest version of the image, and voilá your code should run just fine.
Screenshot 2023-03-10 at 00 53 19

Thanks! All working now! I forgot to switch to PyTorch in Vast.ai

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

7 participants