https://github.com/nixtla logo
#neural-forecast
Title
# neural-forecast
k

kushagra kumar

02/04/2023, 10:24 AM
Hello, I am trying to run the tutorial https://colab.research.google.com/github/Nixtla/neuralforecast/blob/main/nbs/examples/IntermittentData.ipynb on my local windows machine. I have installed all the necessary packages on a clean python virtual env using
pip install neuralforecast statsforecast s3fs fastparquet
cmd. I am getting the below error:
Copy code
from neuralforecast.losses.pytorch import DistributionLoss
ImportError: cannot import name 'DistributionLoss' from 'neuralforecast.losses.pytorch' (E:\MT\code\env\lib\site-packages\neuralforecast\losses\pytorch.py)
Can someone please help. python version is
3.10.9
c

Cristian (Nixtla)

02/06/2023, 3:10 PM
It is possible the DistributionLoss is not yet in PyPi, we will update the version in the following days. In the meantime, you can install it directly from the main branch with
pip install git+<https://github.com/Nixtla/neuralforecast.git@main>
k

kushagra kumar

02/06/2023, 6:57 PM
Thanks a lot @Cristian (Nixtla)
Hi @Cristian (Nixtla): The installation from the main branch is failing as well on my system. I am using clean virtual env to install it. please find the error below:
Copy code
pip install git+<https://github.com/Nixtla/neuralforecast.git@main> 
Collecting git+<https://github.com/Nixtla/neuralforecast.git@main>
  Cloning <https://github.com/Nixtla/neuralforecast.git> (to revision main) to c:\users\lenovo\appdata\local\temp\pip-req-build-anqkfyqq
  Running command git clone --filter=blob:none --quiet <https://github.com/Nixtla/neuralforecast.git> 'C:\Users\lenovo\AppData\Local\Temp\pip-req-build-anqkfyqq'
  Resolved <https://github.com/Nixtla/neuralforecast.git> to commit 6fe9b933fc658a0f96bf968945c9ba59f2bfded8
  Preparing metadata (setup.py) ... done
Collecting numpy>=1.21.6
  Using cached numpy-1.24.2-cp310-cp310-win_amd64.whl (14.8 MB)
Collecting pandas>=1.3.5
  Using cached pandas-1.5.3-cp310-cp310-win_amd64.whl (10.4 MB)
Collecting torch>=1.12.1
  Using cached torch-1.13.1-cp310-cp310-win_amd64.whl (162.6 MB)
Collecting pytorch-lightning==1.6.5
  Using cached pytorch_lightning-1.6.5-py3-none-any.whl (585 kB)
ERROR: Could not find a version that satisfies the requirement ray[tune]==2.0.1 (from neuralforecast) (from versions: 2.2.0)
ERROR: No matching distribution found for ray[tune]==2.0.1