Search Unity

Problem with getting visual observation using server build

Discussion in 'ML-Agents' started by mks0813, Feb 19, 2020.

  1. mks0813

    mks0813

    Joined:
    Oct 3, 2017
    Posts:
    4
    Hello.
    I am using ML-Agents 0.8.1. I tried to train environment using my server. So I built the environment using server build. I obtained vector observation properly, but it only provided visual observation with black image. Is this the problem of ML-Agent 0.8.1?
    Any help would be appreciated.
    Thank you! :)
     
  2. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,822
    Sorry to hear you're having trouble, @mks0813 - we'll circulate this with the team for you. If possible, we'd like to get a few more details; which version of python & C# are you using? Can you share your console logs as well?
     
    mks0813 likes this.
  3. celion_unity

    celion_unity

    Joined:
    Jun 12, 2019
    Posts:
    289
    This is listed as a limitation: "If you enable Headless mode [a.k.a. Server builds], you will not be able to collect visual observations from your agents."

    I believe this is a pretty hard restriction from server mode, and so it's unlikely this limitation will be improved anytime soon.
     
    mks0813 likes this.
  4. mks0813

    mks0813

    Joined:
    Oct 3, 2017
    Posts:
    4
    Thank you! I hope it will be improved soon!
     
  5. paypaytr

    paypaytr

    Joined:
    Jan 30, 2018
    Posts:
    5
    I hope as well
     
  6. mks0813

    mks0813

    Joined:
    Oct 3, 2017
    Posts:
    4
    @TreyK-47 @celion_unity @paypaytr

    Thank you for your replies!!
    I solved this problem!! :)
    I used the environment with Linux build and opened the terminal in the server.
    Then I typed the following commands in the terminal.

    export DISPLAY=:0
    xhost +si:localuser:root

    Then I could get the visual information from the environment.
    If the code occurs an error, please change the first code to "export DISPLAY=:1"
     
  7. paypaytr

    paypaytr

    Joined:
    Jan 30, 2018
    Posts:
    5
    Thanks , appreciated will test it asap @mks0813