Search Unity

  1. Unity 2019.4 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  3. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

Port 5004 don't open ?

Discussion in 'ML-Agents' started by quocnam, Jun 29, 2020 at 5:29 AM.

  1. quocnam

    quocnam

    Joined:
    Dec 2, 2016
    Posts:
    3
    I got the following message from system

    Couldn't connect to trainer on port 5004 using API version 1.0.0. Will perform inference instead. UnityEngine.Debug:Log(Object)

    How could I repair it ?
     
  2. ervteng_unity

    ervteng_unity

    Unity Technologies

    Joined:
    Dec 6, 2018
    Posts:
    48
    Are you using
    mlagents-learn
    and getting this message?:

    Listening on port 5004. Start training by pressing the Play button in the Unity Editor.
     
  3. quocnam

    quocnam

    Joined:
    Dec 2, 2016
    Posts:
    3
    tks! i will try
     
  4. Hsgngr

    Hsgngr

    Joined:
    Dec 28, 2015
    Posts:
    31
    If you are getting this message while you are developing your environment it is okay. Just ignore it. The port usage is about training the agents. You don't need to connect to the python api to work with agents. They have their pre-trained neural networks and these nn modesl are doing all the job. If you are still getting this message when you want to connect the port and train an agent it can cause a problem. Unless ignore it.

    To connect to the port, you need a command prompt which is in directory where your training_configuration yaml is. Then you can start the training by using:
    Code (CSharp):
    1. mlagents-learn ./trainer_config.yaml --run-id first_run
    Then you will see the Unity Logo and it will want from you to start the simulation on Unity Editor. Then your results should come like this:

    upload_2020-6-30_13-3-48.png
     
unityunity