mbaske / ml-agents-hyperparams

Automated Hyperparameter Search for Unity ML-Agents

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Help

nikitaa-x3 opened this issue · comments

Hey!
I really want to try it, but i don't know how to start. I miss some more information and comments.
What do you mean by editor training? Just use a build to start training?
I don't know where to start and what I need to adjust, because I have not coded anything with python in the Unity setup.
Thank you in advance!

Edit: I came a little further. I have this repository in the ml-agents repo and run there now the tune.py. This error follows:

(ml-agents) D:\ML-agents\ml-agents>python ml-agents-hyperparams-master/tune.py Build/labyrinth --run-id=tune_test1
Traceback (most recent call last):
  File "ml-agents-hyperparams-master/tune.py", line 11, in <module>
    from training.runner import Runner
  File "D:\ML-agents\ml-agents\ml-agents-hyperparams-master\training\__init__.py", line 1, in <module>
    from .trainer_controller import *
  File "D:\ML-agents\ml-agents\ml-agents-hyperparams-master\training\trainer_controller.py", line 21, in <module>
    from mlagents.trainers.meta_curriculum import MetaCurriculum
  File "d:\ml-agents\ml-agents\ml-agents\mlagents\trainers\__init__.py", line 5, in <module>
    from .models import *
  File "d:\ml-agents\ml-agents\ml-agents\mlagents\trainers\models.py", line 5, in <module>
    import tensorflow.contrib.layers as c_layers
ModuleNotFoundError: No module named 'tensorflow.contrib.layers' 

What do you mean by Training data is created beforehand?
Do I need to create training data?

Hi @nikitaa-x3 - Please be aware that the code was written for ml-agents v0.5. It won't work with later releases, which might be causing the errors you're seeing.

What do you mean by editor training? Just use a build to start training?

Yes, you need to build an executable. Normally, it's possible to train agents directly in the Unity editor. This doesn't work here, because my code launches multiple instances of the executable, depending on the number of CPU cores.

What do you mean by Training data is created beforehand?
Do I need to create training data?

"Trainig data" refers to the hyperparameters and stop conditions. (Sorry if the readme was unclear on that point, I've now updated that part.)
By default, you're setting hyperparameters in your trainer_config.yaml file for running a single training session.
The idea for this project was to vary some of the hyperparameters, batch run several training sessions, and then compare the results in order to see what values worked best.
You need to define your variable hyperparameters in python, please see tune.py.
The grid_demo example iterates through different values for beta, gamma and hidden_units. It launches instances of the executable for every combination of those hyperparameters values.

Thank you for your response!
Sorry if this is a dumb question, but could it have trouble with a gpu installation?
Maybe I find a way, to update the code to work with the new version...
Or I need to adjust my challenge, because it doesn't work well and I don't know if it is, because of my reward function or the parameters. Or the challenge itself.

I will update you if I succeed, I only have 15 days to complete the task :D