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

Runtime error relating to atari.Action class #20

Open
ugurkanates opened this issue May 2, 2020 · 4 comments
Open

Runtime error relating to atari.Action class #20

ugurkanates opened this issue May 2, 2020 · 4 comments

Comments

@ugurkanates
Copy link

ugurkanates commented May 2, 2020

Tensor.contains only supports Tensor or scalar, but you passed in a <class 'torchcule_atari.AtariAction'>

Just trying bunch of examples provided by NVIDIA but seems sadly there is a bug ?

python 3.7.0
I installed apex from github and did python setup install ( pip version was having issues?)
pytorch 1.4.0
cuda version 10.2

full stack

`Traceback (most recent call last):
  File "vtrace_main.py", line 30, in <module>
    vtrace_main()
  File "vtrace_main.py", line 27, in vtrace_main
    sys.exit(main(vtrace_parser_options, worker))
  File "/home/paypaytr/Desktop/ReinforcementLearning/nvidiaAtari/cule/examples/utils/launcher.py", line 160, in main
    maybe_restart(args, worker)
  File "/home/paypaytr/Desktop/ReinforcementLearning/nvidiaAtari/cule/examples/utils/launcher.py", line 125, in maybe_restart
    dispatch(args, worker)
  File "/home/paypaytr/Desktop/ReinforcementLearning/nvidiaAtari/cule/examples/utils/launcher.py", line 80, in dispatch
    worker(args.local_rank, ngpus_per_node, args)
  File "/home/paypaytr/Desktop/ReinforcementLearning/nvidiaAtari/cule/examples/vtrace/train.py", line 35, in worker
    train_env, test_env, observation = env_initialize(args, env_device)
  File "/home/paypaytr/Desktop/ReinforcementLearning/nvidiaAtari/cule/examples/utils/initializers.py", line 79, in env_initialize
    clip_rewards=args.clip_rewards, frameskip=4)
  File "/home/paypaytr/anaconda3/lib/python3.7/site-packages/torchcule-0.1.0-py3.7-linux-x86_64.egg/torchcule/atari/env.py", line 95, in __init__
    self.fire_reset = torchcule_atari.FIRE in self.action_set
  File "/home/paypaytr/anaconda3/lib/python3.7/site-packages/torch/tensor.py", line 510, in __contains__
    type(element)
RuntimeError: Tensor.__contains__ only supports Tensor or scalar, but you passed in a <class 'torchcule_atari.AtariAction'>.

`
@ifrosio
Copy link
Contributor

ifrosio commented May 4, 2020

If you want to move quick, can you try the docker image? That should work out of the box.

@ugurkanates
Copy link
Author

@ifrosio yes thats what I did. I may also update my fork and do a PR that works with all current version of libraries and Ubuntu 20.04 LTS. This project is too good to left out die.

@ifrosio
Copy link
Contributor

ifrosio commented May 4, 2020

For docker instructions we posted:

FROM nvidia/cuda:10.0-cudnn7-devel-ubuntu18.04 as base
...
RUN pip install torch==1.2.0

It looks like you are using different CUDA / pytorch versions. Any particular reason for this or can you try downgrading to CUDA 10 / pytorch 1.2 / python 3.6?

@ugurkanates
Copy link
Author

@ifrosio Well there are two things ,
1 - able to use latest versions of torch
2- For CUDA I believe NVIDIA handles that part , I don't think you can even downgrade CUDA no ?
I mean I can handle torch with simple conda/ virtual env but yeah atleast CUDA part is I believe should be updated or choseable. My GPU isn't even up to date it's just one of the old models came with laptops 2GB VRAM model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants