rllab-adv icon indicating copy to clipboard operation
rllab-adv copied to clipboard

ImportError: No module named 'gym.monitoring'

Open zhan0903 opened this issue 7 years ago • 11 comments
trafficstars

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.

zhan0903 avatar Apr 17 '18 01:04 zhan0903

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

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

jerinphilip avatar Apr 17 '18 04:04 jerinphilip

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.

zhan0903 avatar Apr 18 '18 01:04 zhan0903

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.

jerinphilip avatar Apr 18 '18 06:04 jerinphilip

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?

zhan0903 avatar Apr 18 '18 11:04 zhan0903

envs are in gym-adv.

jerinphilip avatar Apr 18 '18 11:04 jerinphilip

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?

zhan0903 avatar Apr 18 '18 23:04 zhan0903

viz_results.py, if I remember correctly.

jerinphilip avatar Apr 19 '18 04:04 jerinphilip

Thanks, but that visualize the result only.

zhan0903 avatar Apr 19 '18 11:04 zhan0903

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

zhan0903 avatar Apr 23 '18 10:04 zhan0903

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

TheScott463 avatar Mar 03 '19 20:03 TheScott463

how to do

mumuyanyan avatar Sep 29 '20 06:09 mumuyanyan