Describe the bug
When model.fit() is run with fast_dev_run=True, the code crashes.
fast_dev_run=True disables model checkpoints, but easy_model.py creates the ModelCheckpoint callback regardless (L134). When the same file later checks for the model checkpoint (L181), it doesn't find a file and crashes.
To Reproduce
Run fit() from EasySyntax with fast_dev_run=True passed in (interpreted as one of the trainer_kwargs).
Expected behavior
Expected easy_model.py would not create the ModelCheckpoint callback given fast_dev_run=True.
Full traceback
Please include the full error message to allow for debugging
Traceback (most recent call last):
File "/mnt/home/mayhewfi/DP/event-nn/python/Train.py", line 334, in <module>
main(args)
File "/mnt/home/mayhewfi/DP/event-nn/python/Train.py", line 282, in main
model.fit(
File "/mnt/ffs24/home/mayhewfi/DP/graphnet/src/graphnet/models/easy_model.py", line 182, in fit
torch.load(
File "/mnt/home/mayhewfi/DP/event-nn-env/lib/python3.11/site-packages/torch/serialization.py", line 998, in load
with _open_file_like(f, 'rb') as opened_file:
^^^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/home/mayhewfi/DP/event-nn-env/lib/python3.11/site-packages/torch/serialization.py", line 445, in _open_file_like
return _open_file(name_or_buffer, mode)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/home/mayhewfi/DP/event-nn-env/lib/python3.11/site-packages/torch/serialization.py", line 426, in __init__
super().__init__(open(name, mode))
^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: ''
Describe the bug
When
model.fit()is run withfast_dev_run=True, the code crashes.fast_dev_run=Truedisables model checkpoints, buteasy_model.pycreates theModelCheckpointcallback regardless (L134). When the same file later checks for the model checkpoint (L181), it doesn't find a file and crashes.To Reproduce
Run
fit()fromEasySyntaxwithfast_dev_run=Truepassed in (interpreted as one of thetrainer_kwargs).Expected behavior
Expected
easy_model.pywould not create theModelCheckpointcallback givenfast_dev_run=True.Full traceback
Please include the full error message to allow for debugging