ml-agents icon indicating copy to clipboard operation
ml-agents copied to clipboard

In Jupyter Notebook error "ppo module not found"

Open elanrosen opened this issue 9 years ago • 12 comments

When using the Jupyter Notebook and running the PPO algorithm. The error I received was ppo module not found. My first thought would be to add something like sys.path.append('C:\Users\elanr\Desktop\ml-agents-master\python'). I am unfamiliar with the jupyter repository. Does anyone more experienced know the quick fix to this.

Also should i be connected my tensor-flow GPU environment to this or does tensor-flow automatically use it?

Thanks in advance to anyone who responds

elanrosen avatar Oct 09 '17 01:10 elanrosen

I met the same problem with you .. Hope someone could help us solve the problem

Maomao110 avatar Oct 09 '17 06:10 Maomao110

The easiest solution is that making sure executable and PPO.ipynb under same folder. if you are trying 3DBall,just put executable file into "/ml-agents-master/python/" and then change "env_name" to the name of your exe file.

liuyihunter avatar Oct 09 '17 06:10 liuyihunter

Now , the exe file are in the same folder of the PPO.ipynb. and I have checked the env_name, it is the name of my exe file .. But it still doesn't work.

Maomao110 avatar Oct 09 '17 06:10 Maomao110

image

image

Maomao110 avatar Oct 09 '17 06:10 Maomao110

Literally, The error was No module name "ppo", Maybe check the file name or are there any files inside ppo folder?

liuyihunter avatar Oct 09 '17 06:10 liuyihunter

@liuyihunter thanks for your help. I have solve the problem..Because I did not set the work folder in the jupyter . After I set the default folder as the python, it works.

Maomao110 avatar Oct 09 '17 06:10 Maomao110

@Maomao110 I probally have the exact same issue how do you do that

elanrosen avatar Oct 09 '17 11:10 elanrosen

image find this content in the PPO.ipynb , and then set the value . the value is where your ppo lib located . mine is :E:\StudyProject\ml-agents-master_unity2017\python\ppo

you can try , if it doesn't work , I will show you another way.

Maomao110 avatar Oct 09 '17 12:10 Maomao110

@Maomao110 Didn't work whats the other way?

I would think the work folder would need to be established before you import not after.

elanrosen avatar Oct 09 '17 13:10 elanrosen

The run_path variable is the name of the folder that will contain the tensorflow graph checkpoints. When you will run your model, it will store the checkpoints into python/models/ppo. The fact that the ppo folder containing the scripts for training and the run_path have the same name is coincidence.
Please make sure you start jupyter notebook from the python folder and also that the ppo folder inside python folder contains __init__.py, history.py, models.py and trainer.py
Let me know if this helps.

vincentpierre avatar Oct 09 '17 18:10 vincentpierre

Wrong start folder anyone who had my problem just look up how to change it on google. Pretty straightforward Thanks

elanrosen avatar Oct 09 '17 21:10 elanrosen

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock[bot] avatar Jan 04 '20 23:01 lock[bot]