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

Correction for the name of offline safe algorithm COptiDICE and bug of load_state_dict in normalizer #295

Closed
wants to merge 3 commits into from

Conversation

Komorebi-wd
Copy link

@Komorebi-wd Komorebi-wd commented Dec 23, 2023

Description

The algorithm name for COptiDICE was written incorrectly.

If I use the code part /* return super().load_state_dict(state_dict, strict) */ , the following error will generate
image
something about this error
image

Describe your changes in detail.
change COptDICE to COptiDICE
change return super().load_state_dict(state_dict, strict, assign) to return super().load_state_dict(state_dict, strict)

Motivation and Context

Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.
You can use the syntax close #15213 if this solves the issue #15213

  • I have raised an issue to propose this change (required for new features and bug fixes)

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)

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)

@Komorebi-wd Komorebi-wd reopened this Dec 23, 2023
@Komorebi-wd Komorebi-wd changed the title Correction for the name of offline safe algorithm COptiDICE Correction for the name of offline safe algorithm COptiDICE and bug of load_state_dict in normalizer Dec 23, 2023
@Gaiejj
Copy link
Member

Gaiejj commented Dec 23, 2023

Sorry, it may be an issue with the torch version. Are you using torch >= 2.0.0?

Copy link

codecov bot commented Dec 23, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6d31328) 96.86% compared to head (8eb7cbd) 96.89%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #295      +/-   ##
==========================================
+ Coverage   96.86%   96.89%   +0.03%     
==========================================
  Files         138      138              
  Lines        7000     7000              
==========================================
+ Hits         6780     6782       +2     
+ Misses        220      218       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Gaiejj
Gaiejj previously approved these changes Dec 23, 2023
@Gaiejj Gaiejj dismissed their stale review December 23, 2023 12:51

It is not a bug for omnisafe code, but an issue with torch version.

@Komorebi-wd
Copy link
Author

my torch version is 2.0.1
image

@Gaiejj
Copy link
Member

Gaiejj commented Dec 23, 2023

I think updating torch to >=2.1.0 can resolve this arguments issue:
image

@Komorebi-wd
Copy link
Author

OK,thank you for your explanation.

@Komorebi-wd
Copy link
Author

Komorebi-wd commented Dec 23, 2023

In benchmarks/offline/readme, there may be something wrong
image
is it CRR , but not CCR?

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

2 participants