-
-
Notifications
You must be signed in to change notification settings - Fork 224
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
Common Imports Fix and Readme Update to fix RuntimeError in trainer.fit() #216
base: master
Are you sure you want to change the base?
Conversation
…me to reflect training wrap in __main__
seems like ProgressBarBase contained the "loss" tensor for version 1.8.6, but got removed in ProgressBar version 2.0.0 (the latest of pytorch lightning) I replaced the metrics with the outputs loss value - this doesn't affect the training code at all, its just about the progress bar viewing current and average loss |
this is a really helpful pull req, thanks a lot! however, i still get an error about the kwarg "gpus" being unkown in pytorch's argsparse.py? "gpus" seemed to be part of that trainer object thing in train.py, could you help?
|
Hm, not sure how to reproduce this. Otherwise there is probably a new version of pytorch_lightning that had more breaking changes. But i would need to know which version you have installed there and/or the full stack trace as I canot deciver where the utilities function was called from. On my machine with my version of pytorch_lightning (2.0.0) it works. I will push a restricted requirements.txt shortly |
Thanks for this! I merged these fixes into my custom fork of AITextGen, and it allowed me to upgrade to PL v2.0.4 successfully! |
Running example code with current package creates following errors:
cannot import name 'DeepSpeedPlugin' from 'pytorch_lightning.plugins
-aitextgen.py
line 14cannot import name 'ProgressBarBase' from 'pytorch_lightning.callbacks.progress
-train.py
line 13cannot import name '_TPU_AVAILABLE' from 'pytorch_lightning.utilities
-train.py
line 14 - fixed in update pytorch-lightning requirement to >= 1.8.0 #202Runtime Error: An attempt has been made to start a new process before the current process has finished its bootstrapping phase.
-aitextgen.py
line 752The Runtime error suggests wrapping the user code in a main function as hinted here https://discuss.pytorch.org/t/runtimeerror-an-attempt-has-been-made-to-start-a-new-process-before-the-current-process-has-finished-its-bootstrapping-phase/145462
But I cannot confirm if this fixes the issue as the current code does not progress at all (Might also because ProgressBar is not the correct replacement for ProgressBarBase.
Would love to have your input if theses changes actually work!