lerrel / rllab-adv

Code to train RL agents along with Adversarial distrubance agents
https://arxiv.org/abs/1703.02702
63 stars 14 forks source link

ImportError: No module named 'gym.monitoring' #3

Open zhan0903 opened 6 years ago

zhan0903 commented 6 years ago

When running this code, there is a problem showed in the title. I use my MacBook to run it with the newest operating system version, how to fix it? Thanks.

jerinphilip commented 6 years ago

https://github.com/lerrel/gym-adv/tree/master/gym/monitoring

His fork has the monitoring module, as you can see above. Use it.

zhan0903 commented 6 years ago

Thanks. It works. By the way, the gym-adv is just the gym environment library or it includes the adv algorithms already and no need to use rllab-adv code anymore? Thanks.

jerinphilip commented 6 years ago

gym-adv has modifications to the agent to take in different parameters, the paper discusses modifications so adversary can have superpowers, those features are implemented there I think.

The algorithms are in this repo.

zhan0903 commented 6 years ago

Thanks. I have a question: the author gives an example: "python adversarial/scripts/train_adversary.py --env InvertedPendulumAdv-v1 --folder ~/rllab-adv/results". The parameter "InvertedPendulumAdv-v1" comes from where? How about other envs? Where can I find other env's definition?

jerinphilip commented 6 years ago

envs are in gym-adv.

zhan0903 commented 6 years ago

Thanks. I ran the example, but no cartoon came up, only text result showing on the terminal. How to see the algorithm result in the animation?

jerinphilip commented 6 years ago

viz_results.py, if I remember correctly.

zhan0903 commented 6 years ago

Thanks, but that visualize the result only.

zhan0903 commented 6 years ago

It seems this repo don't include the RARL framework/algorithm implementation, just provide how to train adversary?

TheScott463 commented 5 years ago

Just tried to get this working. but I get this error: File "enjoy-adv.py", line 33, in from gym.monitoring import VideoRecorder ImportError: No module named monitoring

Then trying to pip install -U gym-adv I get:

pip install -U gym-adv Collecting gym-adv Could not find a version that satisfies the requirement gym-adv (from versions: ) No matching distribution found for gym-adv

Advice?

This issue popped up at: ...\rl-attack> python enjoy-adv.py --env Breakout --noisy --mode l-dir ./data/Breakout/model-173000 --video ./Breakout.mp4 Traceback (most recent call last): File "enjoy-adv.py", line 33, in from gym.monitoring import VideoRecorder ImportError: No module named monitoring

mumuyanyan commented 4 years ago

how to do