aicrowd / neurips2020-procgen-starter-kit Goto Github PK
View Code? Open in Web Editor NEWStarter Kit for NeurIPS 2020 - Procgen Competition on AIcrowd
License: Apache License 2.0
Starter Kit for NeurIPS 2020 - Procgen Competition on AIcrowd
License: Apache License 2.0
$ ./run.sh --train
_____ _
/\ |_ _| | |
/ \ | | ___ _ __ _____ ____| |
/ /\ \ | | / __| '__/ _ \ \ /\ / / _ |
/ ____ \ _| || (__| | | (_) \ V V / (_| |
/_/ \_\_____\___|_| \___/ \_/\_/ \__,_|
Executing: python train.py -f experiments/impala-baseline.yaml --ray-memory 1500000000 --ray-num-cpus 2 --ray-object-store-memory 1000000000
Traceback (most recent call last):
File "train.py", line 17, in <module>
from callbacks import CustomCallbacks
File "/Users/bhan/src/go/src/github.com/lyft/neurips2020-procgen-starter-kit/callbacks.py", line 9, in <module>
from ray.rllib.agents.callbacks import DefaultCallbacks
ModuleNotFoundError: No module named 'ray.rllib.agents.callbacks'
pip freeze
shows ray==0.8.4
Installed to a conda environment using
pip install ray[rllib]==0.8.4
pip install tensorflow==2.1.0 # or tensorflow-gpu
pip install procgen==0.10.2
Hi! I'm trying to launch IMPALA baseline with PyTorch. I've set use_pytorch: True
and custom_model: impala_cnn_torch
. Then after running run.sh --train
I got this exception:
ray::PPO.train() (pid=7575, ip=192.168.1.102)
File "python/ray/_raylet.pyx", line 463, in ray._raylet.execute_task
File "python/ray/_raylet.pyx", line 417, in ray._raylet.execute_task.function_executor
File "/home/argentumwalker/anaconda3/lib/python3.7/site-packages/ray/rllib/agents/trainer.py", line 498, in train
raise e
File "/home/argentumwalker/anaconda3/lib/python3.7/site-packages/ray/rllib/agents/trainer.py", line 484, in train
result = Trainable.train(self)
File "/home/argentumwalker/anaconda3/lib/python3.7/site-packages/ray/tune/trainable.py", line 261, in train
result = self._train()
File "/home/argentumwalker/anaconda3/lib/python3.7/site-packages/ray/rllib/agents/trainer_template.py", line 151, in _train
fetches = self.optimizer.step()
File "/home/argentumwalker/anaconda3/lib/python3.7/site-packages/ray/rllib/optimizers/sync_samples_optimizer.py", line 71, in step
self.standardize_fields)
File "/home/argentumwalker/anaconda3/lib/python3.7/site-packages/ray/rllib/utils/sgd.py", line 120, in do_minibatch_sgd
logger.debug("{} {}".format(i, averaged(iter_extra_fetches)))
File "/home/argentumwalker/anaconda3/lib/python3.7/site-packages/ray/rllib/utils/sgd.py", line 30, in averaged
out[k] = np.mean(v)
File "<__array_function__ internals>", line 6, in mean
File "/home/argentumwalker/anaconda3/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 3373, in mean
out=out, **kwargs)
File "/home/argentumwalker/anaconda3/lib/python3.7/site-packages/numpy/core/_methods.py", line 170, in _mean
ret = ret.dtype.type(ret / rcount)
AttributeError: 'torch.dtype' object has no attribute 'type'
My lib versions:
numpy==1.19.0
torch==1.5.1+cu101
ray== 0.8.5
Is there any way to fix this? Thanks.
When I run the command git clone [email protected]:AIcrowd/neurips2020-procgen-starter-kit.git
I get an error
Warning: Permanently added the RSA host key for IP address '140.82.113.3' to the list of known hosts.
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
and when I simply clone the repo and execute the ./run.sh --train
command I can an error
ray.tune.error.TuneError: Insufficient cluster resources to launch trial: trial requested 7 CPUs, 0.8999999999999999 GPUs but the cluster has only 2 CPUs, 1 GPUs, 1.37 GiB heap, 0.63 GiB objects (1.0 node:192.168.1.168). Pass
queue_trials=True in ray.tune.run() or on the command line to queue trials until the cluster scales up or resources become available.
If I append the following code to the end of envs.procgen_env_wrapper.py
and run the file, I'll receive error:
TypeError: seed() takes 1 positional argument but 2 were given
code:
if __name__ == "__main__":
env = ProcgenEnvWrapper({})
env.seed(0)
I've been able to get the repo up and running, and could train
and rollout
successfully, but I didn't understand too much what was going on.
Is it possible to actually visually see the agent playing the games? Thanks!
On following the Getting Started on README, on running ./run.sh --train
, I receive this error:
(aicrowd_env) 23:16:44 varun varun-ubuntu /media/varun/Data/aicrowd/neurips2020-procgen-starter-kit master
$ ./run.sh --train
_____ _
/\ |_ _| | |
/ \ | | ___ _ __ _____ ____| |
/ /\ \ | | / __| '__/ _ \ \ /\ / / _ |
/ ____ \ _| || (__| | | (_) \ V V / (_| |
/_/ \_\_____\___|_| \___/ \_/\_/ \__,_|
Executing: python train.py -f experiments/impala-baseline.yaml --ray-memory 1500000000 --ray-num-cpus 2 --ray-object-store-memory 1000000000
Traceback (most recent call last):
File "train.py", line 40, in <module>
load_envs(os.getcwd()) # Load envs
File "/media/varun/Data/aicrowd/neurips2020-procgen-starter-kit/utils/loader.py", line 62, in load_envs
_source_file(_file_path)
File "/media/varun/Data/aicrowd/neurips2020-procgen-starter-kit/utils/loader.py", line 22, in _source_file
loader.exec_module(mod)
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/media/varun/Data/aicrowd/neurips2020-procgen-starter-kit/envs/procgen_env_wrapper.py", line 65, in <module>
registry.register_env(
File "/media/varun/Data/aicrowd/aicrowd_env/lib/python3.8/site-packages/ray/tune/registry.py", line 86, in register_env
_global_registry.register(ENV_CREATOR, name, env_creator)
File "/media/varun/Data/aicrowd/aicrowd_env/lib/python3.8/site-packages/ray/tune/registry.py", line 112, in register
self._to_flush[(category, key)] = pickle.dumps(value)
File "/media/varun/Data/aicrowd/aicrowd_env/lib/python3.8/site-packages/ray/cloudpickle/cloudpickle_fast.py", line 72, in dumps
cp.dump(obj)
File "/media/varun/Data/aicrowd/aicrowd_env/lib/python3.8/site-packages/ray/cloudpickle/cloudpickle_fast.py", line 617, in dump
return Pickler.dump(self, obj)
TypeError: cannot pickle 'property' object
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.