Open hxuaj opened 3 months ago
Hey @hxuaj, sorry for the troubles.
The first error should be fixed by setting the CUDA_VISIBLE_DEVICES
env variable to one of your devices (0 or 1), either through the terminal or in your session with os.environ
.
The second error I'm guessing refers to the fact that the dataframe has an index, but we're deprecating the datasetsforecast losses, so that should do something like this instead:
from utilsforecast.evaluation import evaluate
from utilsforecast.losses import mse, mae, rmse
evaluation_df = evaluate(cv_df, [mse, mae, rmse])
Hey @hxuaj, sorry for the troubles.
The first error should be fixed by setting the
CUDA_VISIBLE_DEVICES
env variable to one of your devices (0 or 1), either through the terminal or in your session withos.environ
.The second error I'm guessing refers to the fact that the dataframe has an index, but we're deprecating the datasetsforecast losses, so that should do something like this instead:
from utilsforecast.evaluation import evaluate from utilsforecast.losses import mse, mae, rmse evaluation_df = evaluate(cv_df, [mse, mae, rmse])
Hi @jmoralez , Thx for the quick reply. For the first error, my local machine has 2 gpus, seems like a bug with Pytorch lightning: https://github.com/Lightning-AI/pytorch-lightning/issues/4612. However I didn't find a proper solution to this. Just as you suggested, now I can run model fit with only one gpu visible as a workaround. For the second error, I changed the code to:
from utilsforecast.evaluation import evaluate
from utilsforecast.losses import mse, mae, rmse
cv_df.reset_index(inplace=True)
evaluation_df = evaluate(cv_df, [mse, mae, rmse])
Just add index to df before evaluation. Now it works fine.
Could you update the relevant parts in this official tutorial, since it might be frustrated to encounter such error in the exampls. Thank you again.
Just add index to df before evaluation. Now it works fine.
Just ran into the same issue, your workaround fixed it, thanks @hxuaj
@jmoralez , BTW, the error has a typo - datafame
vs dataf_r_ame
(and may as well fix the grammer too: pandas-like dataframe index can't have name
)
BTW, the error has a typo
That's not coming from our libs, feel free to open an issue in the corresponding lib.
What happened + What you expected to happen
Hi, I'm new to nixtla. When I was trying to run the example code in official tutorial on my local machine(Linux, CentOS): https://nixtlaverse.nixtla.io/neuralforecast/examples/getting_started_complete.html, I found it got stuck at
nf.fit(df=Y_df)
step:The processe I did to set up:
pip install statsforecast s3fs datasetsforecast
in the tutorial example.pip install git+https://github.com/Nixtla/neuralforecast.git@main
in the tutorial example.pip install matplotlib
in order to get the 3rd step of the tutorial work.nf = NeuralForecast( models=[ AutoNHITS(h=48, config=config_nhits, loss=MQLoss(), num_samples=5), AutoLSTM(h=48, config=config_lstm, loss=MQLoss(), num_samples=2), ], freq='H' )
withfreq='H'
tofreq=1
sinceValueError: Time column contains integers but the specified frequency is not an integer. Please provide a valid integer, e.g. 'freq=1'
I was wondering what could possibly go wrong in the upper steps and why it got stuck at the training process.
Then, I tried the tutorial notebook in Colab. The fit process can be done, though there is an error when evaluation
evaluation_df = accuracy(cv_df, [mse, mae, rmse], agg_by=['unique_id'])
:Looking forward to your reply.
Versions / Dependencies
OS: Linux CentOS neuralforecast 1.6.4 python 3.9.18 ray 2.9.3 torch 2.2.1 transformers 4.39.0 pandas 2.2.1
Reproduction script
Official tutorial example: https://nixtlaverse.nixtla.io/neuralforecast/examples/getting_started_complete.html
Issue Severity
High: It blocks me from completing my task.