Real-world Reinforcement Learning Challenge Forum

Go back to competition Back to thread list Post in this thread

> Issues

When I run "python $BASELINE_ROOT/revive/train.py --data_file venv.npz --config_file venv.yaml --run_id venv_baseline --venv_mode tune --policy_mode None", I got this issue "AttributeError: module 'torch.distributions.constraints' has no attribute '_CorrCholesky'"

The solution is to change your torch version. My original torch is the 1.9 version, and then, when I change it to the 1.8.1 version, it fix.

Posted by: SillinTang @ Dec. 29, 2021, 9:03 a.m.

Hello SillinTang, we have tested on our machines and found that the baseline is able to run properly on pytorch 1.9. Would please post a more detailed log of error to help us locate this issue? Thanks.

Posted by: polixir @ Dec. 29, 2021, 10:20 a.m.

The whole traceback here:
Traceback (most recent call last):
File "./revive/train.py", line 13, in <module>
from revive.server import ReviveServer
File "/Users/sellintang/Downloads/starting_kit/baseline/revive/revive/server.py", line 27, in <module>
from revive.utils.common_utils import get_reward_fn, list2parser, setup_seed
File "/Users/sellintang/Downloads/starting_kit/baseline/revive/revive/utils/common_utils.py", line 46, in <module>
from revive.computation.graph import DesicionGraph
File "/Users/sellintang/Downloads/starting_kit/baseline/revive/revive/computation/graph.py", line 25, in <module>
from revive.computation.dists import ReviveDistribution
File "/Users/sellintang/Downloads/starting_kit/baseline/revive/revive/computation/dists.py", line 24, in <module>
import pyro
File "/Users/sellintang/miniconda/envs/tf/lib/python3.8/site-packages/pyro/__init__.py", line 4, in <module>
import pyro.poutine as poutine
File "/Users/sellintang/miniconda/envs/tf/lib/python3.8/site-packages/pyro/poutine/__init__.py", line 4, in <module>
from .handlers import (
File "/Users/sellintang/miniconda/envs/tf/lib/python3.8/site-packages/pyro/poutine/handlers.py", line 60, in <module>
from .collapse_messenger import CollapseMessenger
File "/Users/sellintang/miniconda/envs/tf/lib/python3.8/site-packages/pyro/poutine/collapse_messenger.py", line 7, in <module>
from pyro.distributions.distribution import COERCIONS
File "/Users/sellintang/miniconda/envs/tf/lib/python3.8/site-packages/pyro/distributions/__init__.py", line 4, in <module>
import pyro.distributions.torch_patch # noqa F403
File "/Users/sellintang/miniconda/envs/tf/lib/python3.8/site-packages/pyro/distributions/torch_patch.py", line 85, in <module>
@patch_dependency('torch.distributions.constraints._CorrCholesky.check')
File "/Users/sellintang/miniconda/envs/tf/lib/python3.8/site-packages/pyro/distributions/torch_patch.py", line 18, in patch_dependency
module = getattr(module, part)
AttributeError: module 'torch.distributions.constraints' has no attribute '_CorrCholesky'
The problem may be just is I didn't install the correct torch library at the beginning.

Posted by: SillinTang @ Dec. 29, 2021, 10:35 a.m.

Thanks for your reply. We believe that this is a compatible problem between pytorch and its libraries. Maybe re-install the dependencies can fix it.

Posted by: polixir @ Dec. 29, 2021, 1:33 p.m.
Post in this thread