Nixtla / neuralforecast

Scalable and user friendly neural :brain: forecasting algorithms.
https://nixtlaverse.nixtla.io/neuralforecast
Apache License 2.0
3.01k stars 348 forks source link

'pydantic.fields' deprecated #702

Open yguooo opened 1 year ago

yguooo commented 1 year ago

What happened + What you expected to happen

When running nbs/core.ipynb, I encounter the issue that is AttributeError: module 'pydantic.fields' has no attribute 'ModelField' at the following cell of Test predict_insample. ModelField is deprecated long time ago for pydantic.

Versions / Dependencies

All packages installed according to environment.yml, with pydantic==0.18.2 on MAC OS M1.

Reproduction script

Run https://github.com/Nixtla/neuralforecast/blob/main/nbs/core.ipynb

Issue Severity

High: It blocks me from completing my task.

yguooo commented 1 year ago

Screenshot 2023-07-21 at 10 45 06 AM

HRDI0 commented 1 year ago

I have the same error. Here's what I've tried and succeeded with:

ray ==2.2.0 pydantic >=1.8

cuda == 11.7 pytorch == 2.0.1 python == 3.9

but in windows and jupyter notebook.

All other dependencies are installed with conda install neuralforecast.

I think it conflicts with ray and pydantic. When I installed neuralforecast, the ray version is 2.3 and the pydantic version is 0.8.

Currently, pydantic seems to have version 2 as the stable version. Try installing different versions. I hope this solves your problem.