Search Unity

Question Help with a MLagent error

Discussion in 'ML-Agents' started by SpulberA, Dec 17, 2022.

  1. SpulberA

    SpulberA

    Joined:
    Dec 17, 2022
    Posts:
    1
    Hello, Im trying to do a NN with mlagent 0.17.0 following this guide


    and when I enter mlagents-learn ....

    it throws back this

    WARNING:tensorflow:From C:\Users\Alex\.conda\envs\mlagent05\lib\site-packages\tensorflow\python\compat\v2_compat.py:107: disable_resource_variables (from tensorflow.python.ops.variable_scope) is deprecated and will be removed in a future version.
    Instructions for updating:
    non-resource variables are not supported in the long term
    Traceback (most recent call last):
    File "C:\Users\Alex\.conda\envs\mlagent05\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
    File "C:\Users\Alex\.conda\envs\mlagent05\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
    File "C:\Users\Alex\.conda\envs\mlagent05\Scripts\mlagents-learn.exe\__main__.py", line 4, in <module>
    File "C:\Users\Alex\.conda\envs\mlagent05\lib\site-packages\mlagents\trainers\learn.py", line 13, in <module>
    from mlagents.trainers.trainer_controller import TrainerController
    File "C:\Users\Alex\.conda\envs\mlagent05\lib\site-packages\mlagents\trainers\trainer_controller.py", line 14, in <module>
    from mlagents.trainers.env_manager import EnvManager
    File "C:\Users\Alex\.conda\envs\mlagent05\lib\site-packages\mlagents\trainers\env_manager.py", line 12, in <module>
    from mlagents.trainers.policy.tf_policy import TFPolicy
    File "C:\Users\Alex\.conda\envs\mlagent05\lib\site-packages\mlagents\trainers\policy\tf_policy.py", line 17, in <module>
    from mlagents.trainers.settings import TrainerSettings, NetworkSettings
    File "C:\Users\Alex\.conda\envs\mlagent05\lib\site-packages\mlagents\trainers\settings.py", line 180, in <module>
    class TrainerSettings(ExportableSettings):
    File "C:\Users\Alex\.conda\envs\mlagent05\lib\site-packages\mlagents\trainers\settings.py", line 202, in TrainerSettings
    cattr.register_structure_hook(
    File "C:\Users\Alex\.conda\envs\mlagent05\lib\site-packages\cattr\converters.py", line 207, in register_structure_hook
    self._structure_func.register_cls_list([(cl, func)])
    File "C:\Users\Alex\.conda\envs\mlagent05\lib\site-packages\cattr\dispatch.py", line 55, in register_cls_list
    self._single_dispatch.register(cls, handler)
    File "C:\Users\Alex\.conda\envs\mlagent05\lib\functools.py", line 855, in register
    raise TypeError(
    TypeError: Invalid first argument to `register()`. typing.Dict[mlagents.trainers.settings.RewardSignalType, mlagents.trainers.settings.RewardSignalSettings] is not a class.

    and it doesnt show the unity logo.

    What should i do? Also im new to this so i dont know much.
    Also im using anaconda
     
  2. GamerLordMat

    GamerLordMat

    Joined:
    Oct 10, 2019
    Posts:
    185
    the video seems somewhat outdated, try maybe the video from "code monkey"