antonilo / rl_locomotion

Code for training locomotion policies with RL
GNU General Public License v3.0
184 stars 27 forks source link

Ruamel Version Used for Running Visualization Policy #9

Open sukhreens opened 9 months ago

sukhreens commented 9 months ago

Hello,

I am trying to reproduce this code but I am getting errors when it comes to running the visualization policy. I have downloaded the correct version of RaiSim, and I used the command "pip install "ruamel.yaml<0.18.0" which solved an issue I had with running runner.py. However, I can't seem to fix this error when I attempt to run viz_policy.py. I have looked into the issue more, and it seems like this might be due to the wrong ruamel.yaml version in my environment. Does anyone have any potential solutions? Are there any dependencies that I might need that rely on a specific version? Thank you!! Here is the error: `` Laptop:~/WORKSPACE/raisimLib/raisimLib/raisimGymTorch/raisimGymTorch/env/envs/rsg_a1_task$ python viz_policy.py ../../../../data/rsg_a1_task/0002 4000 Traceback (most recent call last): File "viz_policy.py", line 33, in env = VecEnv(rsg_a1_task.RaisimGymEnv(home_path + "/rsc", dump(cfg['environment'], Dumper=RoundTripDumper)), cfg['environment']) RuntimeError: Invalid quote. Line 3: !!python/object/new:ruamel.yaml.scalarfloat.ScalarFloat

``

antonilo commented 9 months ago

Did not have this problem before. Maybe this can help: https://stackoverflow.com/questions/42094599/preserving-quotes-in-ruamel-yaml. I'm sorry that you're having troubles with the yaml library, but this is something we don't have control over. If you find a solution, would you mind sharing it?

IvanPsurtcev commented 1 month ago

Hello, When running the command "python runner.py --name random --gpu 1 --exptid 1" I get an error with an outdated version of ruamel.yaml:

Traceback (most recent call last): File "runner.py", line 62, in AttributeError: "dump()" has been removed, use yaml = YAML(typ='unsafe', pure=True) yaml.dump(...) instead of file "runner.py", line 62 env = VecEnv(rsg_a1_task.RaisimGymEnv(home_path + "/rsc", dump(cfg['environment'], Dumper=RoundTripDumper)), cfg['environment'])

I fix it as I was told in the terminal and get further errors. I decided to try changing the version to ruamel.yaml=17.40 but I get the same error:

python runner.py --name random --gpu 1 --exptid 1 Traceback (most recent call last): File "runner.py", line 62, in env = VecEnv(rsg_a1_task.RaisimGymEnv(home_path + "/rsc", dump(cfg['environment'], Dumper=RoundTripDumper)), cfg['environment']) File "~/raisimGymTorch/env/RaisimGymVecEnv.py", line 16, in init self.wrapper.init() ValueError: Invalid base64 encoding: std::exception

Help me to understand and run the code please