araffin / rl-baselines-zoo

A collection of 100+ pre-trained RL agents using Stable Baselines, training and hyperparameter optimization included.
https://stable-baselines.readthedocs.io/
MIT License
1.12k stars 208 forks source link

AttributeError: module 'train' has no attribute '__path__' #27

Closed patterntrade closed 5 years ago

patterntrade commented 5 years ago

Baselines Zoo

Following the example scripts on the GitHub welcome page.

./run_docker_cpu.sh python -m train.py --algo ppo2 --env MountainCar-v0 -n 50000 -optimize --n-trials 1000 --n-jobs 2 \   --sampler random --pruner median

python -m train.py --algo ppo2 --env MountainCar-v0 -n 50000 -optimize --n-trials 1000 --n-jobs 2 \   --sampler random --pruner median

Both give the same error msg:

... Error while finding module specification for 'train.py' (AttributeError: module 'train' has no attribute '__path__') #27

System Info

Additional context Other scripts, like ./run_docker_cpu.sh python train.py --algo ppo2 --env CartPole-v1 run OK.

araffin commented 5 years ago

Hello,

There seems to be a typo in the readme. This should be python train.py (without the -m)

patterntrade commented 5 years ago

Error stemming from writing

... python -m train.py ...

Instead of just

... python -m train ...

Perhaps the documentation could be updated accordingly?

Thanks for a GREAT code project in constant development, especially appreciating the hyper parameter tuning now included.

araffin commented 5 years ago

Perhaps the documentation could be updated accordingly?

Yep, will be fixed in the next PR (HER-support)