Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation failed: MAX_TORCH_SEED_VALUE too high and specific versions for pytorch and fbprophet needed #235

Closed
JBOE22175 opened this issue Nov 5, 2020 · 7 comments
Labels
bug Something isn't working

Comments

@JBOE22175
Copy link

Install darts on windows

  1. Following the install guide leads to "ERROR: No matching distribution found for torch==1.5.1; extra == "all" (from u8darts[all])"
    You need to specify the versions:
    conda install -c conda-forge -c pytorch pip fbprophet==0.6 pytorch==1.5.1 cpuonly

  2. when fitting the model in "TCN-examples.ipynb" following error pops up:

File "C:\Users\JB\miniconda3\envs\darts2\lib\site-packages\darts\utils\torch.py", line 62, in decorator
    manual_seed(self._random_instance.randint(0, high=MAX_TORCH_SEED_VALUE))
  File "mtrand.pyx", line 743, in numpy.random.mtrand.RandomState.randint
  File "_bounded_integers.pyx", line 1343, in numpy.random._bounded_integers._rand_int32
ValueError: high is out of bounds for int32

I change coding in "...\site-packages\darts\utils\torch.py" in line 17:

#MAX_TORCH_SEED_VALUE = (1 << 63) - 1
MAX_TORCH_SEED_VALUE = 2147483647

After this change it works. It seems that results of model training is not affected.

System (please complete the following information):

  • Win 10
  • Python version: 3.7
  • darts version 0.4.0
@JBOE22175 JBOE22175 added bug Something isn't working triage Issue waiting for triaging labels Nov 5, 2020
@hrzn
Copy link
Contributor

hrzn commented Nov 5, 2020

Thanks for reporting @JBOE22175

@LeoTafti LeoTafti removed the triage Issue waiting for triaging label Nov 28, 2020
@hassanbaablaki hassanbaablaki mentioned this issue Jan 21, 2021
@vl2376
Copy link

vl2376 commented Feb 18, 2021

Still having this issue with darts 0.6.1, python 3.6 and Windows 10

@JBOE22175
Copy link
Author

JBOE22175 commented Feb 18, 2021 via email

@ghost
Copy link

ghost commented Mar 4, 2021

I have this issue as well.

@cosmerodolfo
Copy link

i have the same issue:

image

@Captain-1337
Copy link

This solution should work:

  1. Go to the file \anconda\envs\env_name\lib\site-packages\darts\utils\torch.py in your system
  2. Find the line MAX_TORCH_SEED_VALUE = (1 << 63) - 1 which should be around line 17
  3. Change it to MAX_TORCH_SEED_VALUE = (1 << 31) - 1 so that it fits into 32 bit int.

(credit: https://stackoverflow.com/questions/66514169/when-tcn-is-used-for-prediction-python-there-is-a-valueerror-high-is-out-of-b)

@hrzn
Copy link
Contributor

hrzn commented May 24, 2021

This was fixed in 0.7.0.

@hrzn hrzn closed this as completed May 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants