PKU-Alignment / omnisafe

JMLR: OmniSafe is an infrastructural framework for accelerating SafeRL research.
https://www.omnisafe.ai
Apache License 2.0
912 stars 130 forks source link

fix: remove duplicated auto reset #326

Closed Gaiejj closed 5 months ago

Gaiejj commented 5 months ago

Description

OmniSafe and Safety Gymnasium both provide an AutoReset Wrapper, which automatically calls the reset function to refresh when the current episode ends. This PR is used to fix the issue of environment information getting mixed up due to the repeated use of auto reset.

Types of changes

What types of changes does your code introduce? Put an x in all the boxes that apply:

Checklist

Go over all the following points, and put an x in all the boxes that apply. If you are unsure about any of these, don't hesitate to ask. We are here to help!

codecov[bot] commented 5 months ago

Codecov Report

Attention: Patch coverage is 66.66667% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 96.60%. Comparing base (c6c8aa9) to head (9981f4f).

Files Patch % Lines
omnisafe/envs/mujoco_env.py 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #326 +/- ## ========================================== + Coverage 96.59% 96.60% +0.01% ========================================== Files 139 139 Lines 7090 7089 -1 ========================================== Hits 6848 6848 + Misses 242 241 -1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.