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: Can't pickle local object 'WeakValueDictionary.__init__.<locals>.remove' #12

Open
EaswarGn opened this issue Aug 25, 2024 · 0 comments

Comments

@EaswarGn
Copy link

I am on a M1 Mac Silicon, I ran train.py for the CT-EFT-85 config using a custom generated dataset LE22ct dataset and I got this error, the full traceback is shown below:
Traceback (most recent call last): File "/Users/easwar/Downloads/chess-transformers/chess_transformers/train/train.py", line 516, in <module> train_model(CONFIG) File "/Users/easwar/Downloads/chess-transformers/chess_transformers/train/train.py", line 481, in train_model train_epoch( File "/Users/easwar/Downloads/chess-transformers/chess_transformers/train/train.py", line 75, in train_epoch for i, batch in enumerate(train_loader): ^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/anaconda3/lib/python3.12/site-packages/torch/utils/data/dataloader.py", line 440, in __iter__ return self._get_iterator() ^^^^^^^^^^^^^^^^^^^^ File "/opt/anaconda3/lib/python3.12/site-packages/torch/utils/data/dataloader.py", line 388, in _get_iterator return _MultiProcessingDataLoaderIter(self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/anaconda3/lib/python3.12/site-packages/torch/utils/data/dataloader.py", line 1038, in __init__ w.start() File "/opt/anaconda3/lib/python3.12/multiprocessing/process.py", line 121, in start self._popen = self._Popen(self) ^^^^^^^^^^^^^^^^^ File "/opt/anaconda3/lib/python3.12/multiprocessing/context.py", line 224, in _Popen return _default_context.get_context().Process._Popen(process_obj) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/anaconda3/lib/python3.12/multiprocessing/context.py", line 289, in _Popen return Popen(process_obj) ^^^^^^^^^^^^^^^^^^ File "/opt/anaconda3/lib/python3.12/multiprocessing/popen_spawn_posix.py", line 32, in __init__ super().__init__(process_obj) File "/opt/anaconda3/lib/python3.12/multiprocessing/popen_fork.py", line 19, in __init__ self._launch(process_obj) File "/opt/anaconda3/lib/python3.12/multiprocessing/popen_spawn_posix.py", line 47, in _launch reduction.dump(process_obj, fp) File "/opt/anaconda3/lib/python3.12/multiprocessing/reduction.py", line 60, in dump ForkingPickler(file, protocol).dump(obj) AttributeError: Can't pickle local object 'WeakValueDictionary.__init__.<locals>.remove' /opt/anaconda3/lib/python3.12/site-packages/tables/file.py:113: UnclosedFileWarning: Closing remaining open file: ./LE22c/LE22c.h5 warnings.warn(UnclosedFileWarning(msg))

EaswarGn added a commit to EaswarGn/chess-transformers-fork that referenced this issue Aug 25, 2024
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