jvasso / graph-rl4adaptive-learning

2 stars 1 forks source link

Get error during the reproduction process. #1

Open Kang0108 opened 9 months ago

Kang0108 commented 9 months ago

Hi Dr. Jean Vassoyan:

I am very interested in your research and have attempted to reproduce your code. However, I encountered some issues during this process and would like to seek your guidance.

I encountered an error at the following code snippet in the 'tianshou\env\venvs.py' file while reproducing the code:

        if isinstance(env, (gym.Env, PettingZooEnv)):
            return env

The error message is as follows:

  File "C:\Users\user\anaconda3\envs\pytorch\Lib\site-packages\tianshou\env\worker\dummy.py", line 13, in __init__
    self.env = env_fn()
               ^^^^^^^^
  File "C:\Users\user\anaconda3\envs\pytorch\Lib\site-packages\tianshou\env\venvs.py", line 49, in patched
    if isinstance(env, (gym.Env, PettingZooEnv)):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: isinstance() arg 2 must be a type, a tuple of types, or a union

How should I go about resolving this issue?

My environment is as follows: gymnasium:0.28.1 gym: 0.26.2 Python:3.9 tianshou:0.5.0

jvasso commented 9 months ago

Hi @Kang0108,

Thank you for your message and for pointing out this issue.

This repository has been coded quite clumsily and the procedure outlined in the README.md for the installation of the requirements did not take into account the future evolution of the packages. I've updated the README.md file with a new package installation process, I would suggest you try this one instead.