PKU-Alignment / omnisafe

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

feat: support interface of environment customization #310

Closed Gaiejj closed 7 months ago

Gaiejj commented 7 months ago

Description

Motivation and Context

The environment customization interface is an important feature (see #291, #285, #305) OmniSafe Team. As a toolkit to accelerate SafeRL research, we offer a flexible environment customization interface with the following characteristics:

Most importantly, users can embed their environments into the OmniSafe training framework with little to no modification of OmniSafe's source code. We provide detailed API documentation and tutorials for the SafeRL community to reference.

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 7 months ago

Codecov Report

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

Project coverage is 96.56%. Comparing base (51a2692) to head (673ce70).

Files Patch % Lines
omnisafe/envs/custom_env.py 59.18% 20 Missing :warning:
omnisafe/adapter/offpolicy_adapter.py 66.67% 1 Missing :warning:
omnisafe/adapter/online_adapter.py 93.33% 1 Missing :warning:
omnisafe/adapter/onpolicy_adapter.py 50.00% 1 Missing :warning:
omnisafe/algorithms/off_policy/ddpg.py 66.67% 1 Missing :warning:
...isafe/algorithms/on_policy/base/policy_gradient.py 75.00% 1 Missing :warning:
omnisafe/envs/core.py 90.91% 1 Missing :warning:
omnisafe/envs/mujoco_env.py 66.67% 1 Missing :warning:
omnisafe/envs/safety_gymnasium_modelbased.py 66.67% 1 Missing :warning:
omnisafe/evaluator.py 83.33% 1 Missing :warning:
... and 1 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #310 +/- ## ========================================== - Coverage 96.89% 96.56% -0.33% ========================================== Files 138 139 +1 Lines 7000 7089 +89 ========================================== + Hits 6782 6845 +63 - Misses 218 244 +26 ```

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