You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it good practice to do so? Since there's no simple way of checking whether an environment is closed, I propose to consider that calling the close method on a closed environment should not raise an error.
Pitch
Give your opinion, I'll handle the PR if you're ok.
Alternatives
Add an is_closed method, and always raise an error when the user tries to close a closed environment.
Yes, I think this is a good idea and yes on the PR, thanks for offering
Would we prevent the second close in the PassiveEnvCheckerWrapper from being forwarded to the base environment?
Would we prevent the second close in the PassiveEnvCheckerWrapper` from being forwarded to the base environment?
I would say no. From a user's perspective, I expect the PassiveEnvChecker to check the environment passively. Preventing a second close can't be considered "passive" anymore.
Proposal
Motivation
It's usually possible to reset an environment several times.
Is it good practice to do so? Since there's no simple way of checking whether an environment is closed, I propose to consider that calling the
close
method on a closed environment should not raise an error.Pitch
Give your opinion, I'll handle the PR if you're ok.
Alternatives
Add an
is_closed
method, and always raise an error when the user tries to close a closed environment.(But it would break so many things...)
Additional context
See DLR-RM/stable-baselines3#1525, and especially DLR-RM/stable-baselines3#1525 (comment)
Checklist
The text was updated successfully, but these errors were encountered: