Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Cannot auto save model after training wiith ml-agents0.13.1

Discussion in 'ML-Agents' started by AngelClannad, Apr 22, 2020.

  1. AngelClannad

    AngelClannad

    Joined:
    Mar 16, 2019
    Posts:
    6
    I use ml-agents 0.13.1 to train the agent according to the document “Making a New Learning Environment”.Everything was right during the training process.However,after the training was done,the information that INFO:mlagents.trainer:Exported /.nn file showed,I can't find the model with that path.There is no model folder in ./ml-agents/.I did not interrupt the training by pressing Ctrl+C or stopping Unity Editor.
    This happened several times.First,I installed python virtual environment and training in it,the autosave failed.Then I deactivated the virtual environment and download the python packages again,I trained again and it worked.I can find the .nn file in the./ml-agents/run-id/behavior name/.But,today, when I use it again with different run-id,it failed.Then I trained 3DBall and still can't get the model.

    OS:win10 64bit 1909
    Unity:2018.4.14
    ML-Agents:0.13.1
    TensorFlow:2.0.1
    Python:3.6.8
     
  2. vincentpierre

    vincentpierre

    Joined:
    May 5, 2017
    Posts:
    160
    When the console prints

    Exported ./models/ppo/<behavior_name>.nn file


    The model should be at that path.
    .
    means your current directory. Make sure you are running the mlagents-learn command from the right ml-agents directory.

    The fact that you got it to run with a specific run-id and not another makes me think that this is probably due to running the command in the wrong directory,
     
  3. AngelClannad

    AngelClannad

    Joined:
    Mar 16, 2019
    Posts:
    6
    Oh,I find those models in C:\user\models. I didn't change the directory when training.Thanks a lot,really appreciate.