Skip to content

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

@JBOE22175

Description

@JBOE22175

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions