Search Unity

Tensorflow error when trying to train the 3DBall example

Discussion in 'ML-Agents' started by NaejDoreeTeamTO, Apr 1, 2020.

  1. NaejDoreeTeamTO

    NaejDoreeTeamTO

    Joined:
    Feb 10, 2020
    Posts:
    3
    Hi,
    I've been trying to setup ml-agents for a bit now and looked for solutions but didn't found any that worked for me.

    I'm on windows 10, running python 3.8.2

    After cloning the ml-agent repository I've followed the installation guide and stumbled first on the fact that ml-agent did not find a good tensorflow version.

    Running "pip install mlagents" in a venv resulted in a fail in the tensorflow install part.

    But I avoided this error later by running pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.7.1-py3-none-any.whl

    But when I arrive at the moment where you train you own NN with "mlagents-learn config/trainer_config.yaml --run-id=firstRun --train" it fails because tensorflow is missing "_pywrap_tensorflow_internal"

    So if anyone has an idea on how to solve this problem please give me a hint !
     
  2. LexVolkov

    LexVolkov

    Joined:
    Sep 14, 2014
    Posts:
    62
    all files must be installed in a virtual zone. otherwise they will not see each other. I, too, did not succeed in installing it the first time. Try to do the installation first and carefully.
     
  3. NaejDoreeTeamTO

    NaejDoreeTeamTO

    Joined:
    Feb 10, 2020
    Posts:
    3
    What do you mean by all files must be installed in a virtual zone ?
    Here's a breackdown of my installation process :

    md python-envs
    python3 -m venv python-envs\ml-agent
    python-envs\ml-agent\Scripts\activate

    from here we're in a virual env :

    easy_install -U pip
    pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.7.1-py3-none-any.whl
    pip install mlagents

    and then i try to run :

    mlagents-learn config/trainer_config.yaml --run-id=firstRun --train --time-scale=100


    I tried removing the venv and restarting from scratch just whith this exact process
     
  4. NaejDoreeTeamTO

    NaejDoreeTeamTO

    Joined:
    Feb 10, 2020
    Posts:
    3
    I finally solved it \o/

    So there were two problems : I was running python 3.8 and tensorflow doesn't support versions above 3.6 and also you have to get a random .dll from visual studio to make it work on windows.

    Basically : follow the requirements to install tensorflow before trying to install ml-agents