-
Notifications
You must be signed in to change notification settings - Fork 21
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
When I run train_copo, I get an error during the run #41
Comments
hi @thedieiscast, I have met the same problem. Have you solved it? |
The ray version is incompatible to the Gym version. I remember we need to use a specific version of gym. After installing MetaDrive, the gym version is overwritten so you have to downgrade to a certain version. In CoPO setup the gym version is hardcoded to 0.19.0. Could you double check your version and see if this helps?
Another issue might be the MetaDrive version. My benchmark result use MetaDrive 0.2.5, so I would recommend stick to this version.
https://github.com/metadriverse/metadrive-benchmark/tree/main/MARL <https://github.com/metadriverse/metadrive-benchmark/tree/main/MARL>
Best,
Zhenghao
… On Aug 2, 2023, at 11:38 PM, smallcatd ***@***.***> wrote:
hi @thedieiscast <https://github.com/thedieiscast>, I have met the same problem. Have you solved it?
—
Reply to this email directly, view it on GitHub <#41 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AFJNUE2UCFZDVTWICJRDYKLXTNBOBANCNFSM6AAAAAAZL6HI4U>.
You are receiving this because you are subscribed to this thread.
|
hi, I've got the same problem with you. After making sure the gym == 1.19.0 and maetdrive==0.2.5, it still doesn't work. Have you successfully solved this problem? |
Hi, it seems that making gym==0.20.0 is effective.I don't the reason(Probably because there is something wrong with the gym library itself, and they fixed this bug in the later version SB3 breaks with gym==0.20.0 ), but it does solve the problem, here is the pip package version list of my conda env: |
Hi I've updated the dependencies requirement. Our code support MetaDrive 0.2.5 instead of the latest version. Here is the result when I ran with MetaDrive-0.2.5: https://github.com/decisionforce/CoPO/tree/main/benchmarks/MetaDrive-0.2.5 To provide more information to you, this is the environment that I succesfully run code: Package Version Editable project location
------------------------ ---------- -----------------------------
absl-py 2.1.0
aiohttp 3.8.6
aiohttp-cors 0.7.0
aioredis 2.0.1
aiosignal 1.3.1
annotated-types 0.5.0
anyio 3.7.1
astunparse 1.6.3
async-timeout 4.0.3
asynctest 0.13.0
atari-py 0.2.6
attrs 23.2.0
blessed 1.20.0
cachetools 5.3.2
certifi 2022.12.7
charset-normalizer 3.3.2
click 8.1.7
cloudpickle 1.6.0
colorama 0.4.6
colorful 0.5.6
copo 0.0.0 /home/zhenghao/CoPO/copo_code
cycler 0.11.0
decorator 5.1.1
distlib 0.3.8
dm-tree 0.1.8
exceptiongroup 1.2.0
filelock 3.12.2
Flask 2.2.5
fonttools 4.38.0
frozenlist 1.3.3
gast 0.3.3
google-api-core 2.15.0
google-auth 2.27.0
google-auth-oauthlib 0.4.6
google-pasta 0.2.0
googleapis-common-protos 1.62.0
gpustat 1.1.1
grpcio 1.60.0
gym 0.23.1
gym-notices 0.0.8
h11 0.14.0
h5py 2.10.0
idna 3.6
imageio 2.31.2
importlib-metadata 6.7.0
importlib-resources 5.12.0
iniconfig 2.0.0
itsdangerous 2.1.2
Jinja2 3.1.3
jsonschema 4.17.3
Keras-Preprocessing 1.1.2
kiwisolver 1.4.5
kubernetes 29.0.0
lz4 4.3.2
Markdown 3.4.4
markdown-it-py 2.2.0
MarkupSafe 2.1.4
matplotlib 3.5.3
mdurl 0.1.2
metadrive-simulator 0.2.5
msgpack 1.0.5
multidict 6.0.4
networkx 2.6.3
numpy 1.21.6
nvidia-cublas-cu11 11.10.3.66
nvidia-cuda-nvrtc-cu11 11.7.99
nvidia-cuda-runtime-cu11 11.7.99
nvidia-cudnn-cu11 8.5.0.96
nvidia-ml-py 12.535.133
oauthlib 3.2.2
opencensus 0.11.4
opencensus-context 0.1.3
opt-einsum 3.3.0
packaging 23.2
Panda3D 1.10.14
panda3d-gltf 0.14
panda3d-simplepbr 0.10
pandas 1.3.5
Pillow 9.5.0
pip 22.3.1
pkgutil_resolve_name 1.3.10
platformdirs 4.0.0
pluggy 1.2.0
prometheus-client 0.17.1
protobuf 3.20.3
psutil 5.9.8
py-spy 0.3.14
pyasn1 0.5.1
pyasn1-modules 0.3.0
pydantic 1.9.0
pydantic_core 2.14.6
pygame 2.5.2
Pygments 2.17.2
pyparsing 3.1.1
pyrsistent 0.19.3
pytest 7.4.4
python-dateutil 2.8.2
pytz 2023.4
PyWavelets 1.3.0
PyYAML 6.0.1
ray 2.2.0
redis 5.0.1
requests 2.31.0
requests-oauthlib 1.3.1
rich 13.7.0
rsa 4.9
scikit-image 0.19.3
scipy 1.7.3
seaborn 0.12.2
setuptools 65.6.3
six 1.16.0
sniffio 1.3.0
starlette 0.29.0
tabulate 0.9.0
tensorboard 2.11.2
tensorboard-data-server 0.6.1
tensorboard-plugin-wit 1.8.1
tensorboardX 2.6.2.2
tensorflow 2.3.1
tensorflow-estimator 2.3.0
tensorflow-probability 0.11.1
termcolor 2.3.0
tifffile 2021.11.2
tomli 2.0.1
torch 1.13.1
tqdm 4.66.1
typer 0.9.0
typing_extensions 4.7.1
urllib3 2.0.7
uvicorn 0.22.0
virtualenv 20.25.0
wcwidth 0.2.13
websocket-client 1.6.1
Werkzeug 2.2.3
wheel 0.38.4
wrapt 1.16.0
yapf 0.30.0
yarl 1.9.4
zipp 3.15.0 |
2023-06-19 21:22:48,277 ERROR trial_runner.py:1088 -- Trial CoPOTrainer_MultiAgentIntersectionEnv_0e9dd_00000: Error processing event.
ray.exceptions.RayTaskError(AttributeError): ray::CoPOTrainer.save() (pid=22984, ip=127.0.0.1, repr=CoPOTrainer)
File "python\ray_raylet.pyx", line 830, in ray._raylet.execute_task
File "python\ray_raylet.pyx", line 834, in ray._raylet.execute_task
File "python\ray_raylet.pyx", line 780, in ray._raylet.execute_task.function_executor
File "D:\Anaconda\envs\copo\lib\site-packages\ray_private\function_manager.py", line 674, in actor_method_executor
return method(__ray_actor, *args, **kwargs)
File "D:\Anaconda\envs\copo\lib\site-packages\ray\util\tracing\tracing_helper.py", line 466, in _resume_span
return method(self, *_args, **_kwargs)
File "D:\Anaconda\envs\copo\lib\site-packages\ray\tune\trainable\trainable.py", line 473, in save
checkpoint_dict_or_path = self.save_checkpoint(checkpoint_dir)
File "D:\Anaconda\envs\copo\lib\site-packages\ray\util\tracing\tracing_helper.py", line 466, in _resume_span
return method(self, *_args, **_kwargs)
File "D:\Anaconda\envs\copo\lib\site-packages\ray\rllib\algorithms\algorithm.py", line 1959, in save_checkpoint
state = self.getstate()
File "D:\Anaconda\envs\copo\lib\site-packages\ray\util\tracing\tracing_helper.py", line 466, in _resume_span
return method(self, *_args, **_kwargs)
File "D:\Anaconda\envs\copo\lib\site-packages\ray\rllib\algorithms\algorithm.py", line 2382, in getstate
state["worker"] = self.workers.local_worker().get_state()
File "D:\Anaconda\envs\copo\lib\site-packages\ray\rllib\evaluation\rollout_worker.py", line 1602, in get_state
policy_states[pid] = self.policy_map[pid].get_state()
File "D:\Anaconda\envs\copo\lib\site-packages\ray\rllib\policy\torch_mixins.py", line 98, in get_state
state = super().get_state()
File "D:\Anaconda\envs\copo\lib\site-packages\ray\rllib\policy\torch_policy_v2.py", line 907, in get_state
state = super().get_state()
File "D:\Anaconda\envs\copo\lib\site-packages\ray\rllib\policy\policy.py", line 917, in get_state
state["policy_spec"] = policy_spec.serialize()
File "D:\Anaconda\envs\copo\lib\site-packages\ray\rllib\policy\policy.py", line 133, in serialize
"action_space": space_to_dict(self.action_space),
File "D:\Anaconda\envs\copo\lib\site-packages\ray\rllib\utils\serialization.py", line 140, in space_to_dict
d = {"space": gym_space_to_dict(space)}
File "D:\Anaconda\envs\copo\lib\site-packages\ray\rllib\utils\serialization.py", line 119, in gym_space_to_dict
return _box(space)
File "D:\Anaconda\envs\copo\lib\site-packages\ray\rllib\utils\serialization.py", line 62, in _box
"shape": sp._shape, # shape is a tuple.
AttributeError: 'Box' object has no attribute '_shape'
Why this error occurs and how to correct it
The text was updated successfully, but these errors were encountered: