Problems with Python and training
I'm having trouble figuring the new stuff out, I had everything up and running with the previous ML-Agents and I have the Python 3.6.3 version installed. But when I do this:
To summarize, go to your command line, enter the ml-agents directory and type: python3 python/learn.py <env_file_path> --run-id= --train
It says that python3 is not recognised as a command. Any clue whats going on? Probably I'm missing some stuff that is needed after the changes and not before, but after looking for hours I can't figure out what it is.
The error is python3 not recognized as a command? Have you tried with python? How is your python installed? How do you run python scripts on your machine? If you ran python version 3.6.3 with the version 0.2, you should be able to run learn.py the same way you ran ppo.py previously.
I installed Python whit Anaconda. It worked when I tried with python.
But in no way I can run it like before. Before I used the PPO.ipynb in Jupyter Notebook.
And now that I got it working I have a question. Is there a way to stop mid training and save as a .bytes the last saved model? So in other words, if my agents is already trained can I save the model in a .bytes file before the training steps have ended?
in the learn.py there is a save_freq parameter. If the model reach this step, it automatically save into a .bytes format. so you can stop your training.
you can also stop it during the training and it will save .bytes file in models folder. To stop in anaconda environment use ctrl+c.
@asimniazi63 It didn't work. It just stopped, the folder only contains the checkpoint file + data, index and meta files.
@GeriBP Can you please post the output from the command line? Also provide us with some details in terms of how many steps you are trying to train for etc?
@GeriBP ctrl+c didn't work for me at first either. I fixed it by moving my ml-agents folder out of my dropbox folder (the error message was complaining about the folder being in use by a different process). This seems to have fixed the problem; the bytes file and other files are there, though I haven't had time test if the brain runs without issue in internal mode.
Hey folks, closing out this issue due to inactivity. Do submit a new one if you face additional problems.
This bug has been fixed with https://github.com/Unity-Technologies/ml-agents/pull/1558. The error message
forrtl: error (200): program aborting due to control-C event
Image PC Routine Line Source
libifcoremd.dll 00007FFDAFF994C4 Unknown Unknown Unknown
KERNELBASE.dll 00007FFDEF127EDD Unknown Unknown Unknown
KERNEL32.DLL 00007FFDF2131FE4 Unknown Unknown Unknown
ntdll.dll 00007FFDF226EFC1 Unknown Unknown Unknown
still exist, which is related to this stackoverflow https://stackoverflow.com/questions/42653389/ctrl-c-causes-forrtl-error-200-rather-than-python-keyboardinterrupt-exception. Our fix get around this error by adding another ctrl-c event handler which saves the model before this error.
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.