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
Describe the bug
The model documentation states that when calling model.save the path parameter is optional, and that "If no path is specified, the model is automatically saved under "{ModelClass}_{YYYY-mm-dd_HH:MM:SS}.pt". E.g., "RNNModel_2020-01-01_12:00:00.pt".
However, if it is left unfilled the following exception will be thrown:
File "...\venv\lib\site-packages\darts\models\forecasting\torch_forecasting_model.py", line 1271, in save
with open(path, "wb") as f_out:
OSError: [Errno 22] Invalid argument: 'RNNModel_2023-02-11_23:31:42.pt'
I assume this is because ':' cannot be used in file names in Windows. One possibility is to use the formatting of '%Y%m%d-%H%M%S' as specified in this Stack Overflow post.
To Reproduce
Simply run.
from darts.models import RNNModel
model = RNNModel(input_chunk_length=4)
model.save()
Expected behavior
It is expected for the model to save in the current working dir in a reasonable model name and date format.
System (please complete the following information):
Python version: 3.10
darts version 0.23.1
Windows 10.0.19045
Thanks!
The text was updated successfully, but these errors were encountered:
Describe the bug
The model documentation states that when calling model.save the path parameter is optional, and that "If no path is specified, the model is automatically saved under "{ModelClass}_{YYYY-mm-dd_HH:MM:SS}.pt". E.g., "RNNModel_2020-01-01_12:00:00.pt".
However, if it is left unfilled the following exception will be thrown:
I assume this is because ':' cannot be used in file names in Windows. One possibility is to use the formatting of '%Y%m%d-%H%M%S' as specified in this Stack Overflow post.
To Reproduce
Simply run.
Expected behavior
It is expected for the model to save in the current working dir in a reasonable model name and date format.
System (please complete the following information):
Thanks!
The text was updated successfully, but these errors were encountered: