You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ModelCheckpoint callback's argument filepath cannot be None even though the docs says:
Can also be set to None, then it will be set to default location during trainer construction.
The exception is raised:
Traceback (most recent call last):
File "/home/pi3ni0/Workspace/random/siamese_cnn_glove.py", line 209, in <module>
checkpoint_callback = ModelCheckpoint(
File "/home/pi3ni0/.venv/dev/lib/python3.6/site-packages/pytorch_lightning/callbacks/model_checkpoint.py", line 89, in __init__
if save_top_k > 0 and os.path.isdir(filepath) and len(os.listdir(filepath)) > 0:
File "/home/pi3ni0/.venv/dev/lib/python3.6/genericpath.py", line 42, in isdir
st = os.stat(s)
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
It is because os.path.isdir cannot be applied to None argument.
🐛 Bug
The
ModelCheckpoint
callback's argumentfilepath
cannot be None even though the docs says:The exception is raised:
It is because
os.path.isdir
cannot be applied to None argument.Code sample
Environment
The text was updated successfully, but these errors were encountered: