Search Unity

Imitation Learning Error Message

Discussion in 'ML-Agents' started by Xiromtz, Feb 15, 2020.

  1. Xiromtz

    Xiromtz

    Joined:
    Feb 1, 2015
    Posts:
    65
    Hello,
    I'm currently trying to get imitiation learning to work. I've done the recording session and got my .demo file ready to go.
    I've set the demo_path for behavioral_cloning + gail in my config file. I've tested it with only gail and with only behavioral cloning or both and although the error messages differ, it seems to not be able to find my demo file, no matter what i try.
    I think there is no check for the correct filepath, so i'm not 100% sure if this has to do with an incorrect filepath. If I use a random wrong filepath I get the same error messages, so I'm assuming this is the case.

    I'm assuming the relative filepath starts from the folder I called "mlagents-learn" from. I have my demo file in my "config" folder, thus my path is "./config/PlayerRecording_0.demo". I've tried using the full path "J:/Documents/../ML-Agents_Envs/config/PlayerRecording_0.demo" with the same results.

    At this point I don't really know what to do, since I've tried all possible file paths.

    The error message I get when using behavioral cloning is:
    "TypeError: '>' not supported between instances of 'str' and 'int'"

    And using gail:
    "IndexError: agent_id 0 is not present in the BatchedStepResult"

    Thanks in advance!
     
  2. Xiromtz

    Xiromtz

    Joined:
    Feb 1, 2015
    Posts:
    65
    Apparently my .yaml config file didn't save correctly and not everything is correct:
    When using the wrong filepath with Gail, it gives me a different error message in the form of "directory not found".
    When using the wrong filepath with behavioral cloning I get the same error message as with the correct filepath.

    So this seems to NOT be an error with the filepath, but with my .demo file itself. Is there any way I can find out what's going wrong here?
     
  3. celion_unity

    celion_unity

    Joined:
    Jun 12, 2019
    Posts:
    289
    Sounds like the same issue reported in https://github.com/Unity-Technologies/ml-agents/issues/3455. Can you comment there with the full stacktrace you got from using behavioral cloning (since that part sounds different). We'll look into it first thing on Tuesday (our office is closed on Monday).
     
  4. celion_unity

    celion_unity

    Joined:
    Jun 12, 2019
    Posts:
    289
    Just a heads up that this should be fixed in the 0.14.1 release, which came out today. Your demonstration files from 0.14.0 will load, but you probably need to re-record them because some information wasn't captured during the initial recording.