Search Unity

Has anyone encountered this problem?

Discussion in 'ML-Agents' started by akaiHuang, Sep 25, 2022.

  1. akaiHuang

    akaiHuang

    Joined:
    May 28, 2020
    Posts:
    1
    I'm macos13, M1Max
    python version 3.10.6
    torch>1.8.1


    Traceback (most recent call last):

    File "/opt/homebrew/bin/mlagents-learn", line 33, in <module>

    sys.exit(load_entry_point('mlagents', 'console_scripts', 'mlagents-learn')())

    File "/opt/homebrew/bin/mlagents-learn", line 25, in importlib_load_entry_point

    return next(matches).load()

    File "/opt/homebrew/Cellar/python@3.9/3.9.14/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/metadata.py", line 86, in load

    module = import_module(match.group('module'))

    File "/opt/homebrew/Cellar/python@3.9/3.9.14/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/__init__.py", line 127, in import_module

    return _bootstrap._gcd_import(name[level:], package, level)

    File "<frozen importlib._bootstrap>", line 1030, in _gcd_import

    File "<frozen importlib._bootstrap>", line 1007, in _find_and_load

    File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked

    File "<frozen importlib._bootstrap>", line 680, in _load_unlocked

    File "<frozen importlib._bootstrap_external>", line 850, in exec_module

    File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed

    File "/Users/username/Desktop/10_unity/gym01/ml-agents/mlagents/trainers/learn.py", line 2, in <module>

    from mlagents import torch_utils

    File "/Users/username/Desktop/10_unity/gym01/ml-agents/mlagents/torch_utils/__init__.py", line 1, in <module>

    from mlagents.torch_utils.torch import torch as torch # noqa

    File "/Users/username/Desktop/10_unity/gym01/ml-agents/mlagents/torch_utils/torch.py", line 6, in <module>

    from mlagents.trainers.settings import TorchSettings

    File "/Users/username/Desktop/10_unity/gym01/ml-agents/mlagents/trainers/settings.py", line 644, in <module>

    class TrainerSettings(ExportableSettings):

    File "/Users/username/Desktop/10_unity/gym01/ml-agents/mlagents/trainers/settings.py", line 667, in TrainerSettings

    cattr.register_structure_hook(

    File "/opt/homebrew/lib/python3.9/site-packages/cattr/converters.py", line 207, in register_structure_hook

    self._structure_func.register_cls_list([(cl, func)])

    File "/opt/homebrew/lib/python3.9/site-packages/cattr/dispatch.py", line 55, in register_cls_list

    self._single_dispatch.register(cls, handler)

    File "/opt/homebrew/Cellar/python@3.9/3.9.14/Frameworks/Python.framework/Versions/3.9/lib/python3.9/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.
     
  2. miguelalonsojr

    miguelalonsojr

    Unity Technologies

    Joined:
    Jan 13, 2021
    Posts:
    8