-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python Bug: lambda function refers only one environment #1155
Comments
You are using a very old version of tianshou. Could you pls try on either 1.0.0 or on the version on master? |
@MischaPanch
However, this lambda function issue remains. |
Hi @maguro27, It seems that This should now work as expected since the default value for
Which Tianshou tutorial are you looking at? |
Thank you for your comments. Tianshou tutorials only use default gym environments. |
The tutorial uses the lambda function for making callable environment functions many times.
However, I confirmed the Python bug (Python 3.10.12) when I use user-defined environment that is shown as follows,
Then, I can get the same return values of the environment, but stacked 4.
Hence, I fix the above code as follows,
This works properly.
In conclusion, I suggest that the tutorial should not use the lambda function.
The text was updated successfully, but these errors were encountered: