Skip to content
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

feat: add ddpg, clean some code, modify algo_wrapper #24

Merged
merged 28 commits into from
Dec 2, 2022

Conversation

zmsn-2077
Copy link
Member

Description

  1. add off-policy ddpg and test it in SafetyPointGoal1
  2. rename train_on_policy.py to train_policy.py, unify off-policy and on-policy api
  3. del some needless code
  4. on-policy code pass pylint
  5. some spelling mistakes were corrected

image

Types of changes

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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds core functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (update in the documentation)

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!

  • I have read the CONTRIBUTION guide. (required)
  • My change requires a change to the documentation.
  • I have updated the tests accordingly. (required for a bug fix or a new feature)
  • I have updated the documentation accordingly.
  • I have reformatted the code using make format. (required)
  • I have checked the code using make lint. (required)
  • I have ensured make test pass. (required)

hdadong
hdadong previously approved these changes Dec 2, 2022
@zmsn-2077 zmsn-2077 merged commit f5beca8 into PKU-Alignment:main Dec 2, 2022
seed: 0
# Basic Configurations
epochs: 500
steps_per_epoch: 30000
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please follow the .editorconfig: ident with 2 spaces.

@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================

"""Implementation of the CPPOPid algorithm."""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add an extra linebreak between the module docstring and imports. Same changes for other source files.

@@ -1,6 +1,6 @@
##### Project Specification #####
**/runs

**/scripts
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add an extra linebreak here.

'TRPOLag',
],
'model-based': ['MBPPOLag', 'SafeLoop'],
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Constants should use ALL_CAPS names. Also, this may place after the import statements.

Copy link
Member

@XuehaiPan XuehaiPan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The commit message is not in semantic commit format.

@zmsn-2077 zmsn-2077 changed the title [feat] add ddpg, clean some code, modify algo_wrapper feat: add ddpg, clean some code, modify algo_wrapper Dec 2, 2022
zmsn-2077 added a commit that referenced this pull request Dec 2, 2022
muchvo pushed a commit to muchvo/omnisafe that referenced this pull request Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants