-
Notifications
You must be signed in to change notification settings - Fork 126
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 model-based algorithms #212
Conversation
fa69e8c
to
578c744
Compare
c37c51f
to
602f6a2
Compare
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## dev #212 +/- ##
==========================================
- Coverage 97.00% 95.99% -1.01%
==========================================
Files 99 118 +19
Lines 4331 5987 +1656
==========================================
+ Hits 4201 5747 +1546
- Misses 130 240 +110
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
2777eda
to
5454ed9
Compare
a2874f9
to
0346df5
Compare
0346df5
to
b5a900a
Compare
a9e7d6f
to
2c38aa6
Compare
85a21a2
to
0709d5b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
example: | ||
|
||
```python | ||
path ='/home/username/omnisafe/omnisafe/examples/benchmarks/exp-x/Model-Based-Benchmarks' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be relative path better. e.g. ./examples/benchmarks/exp-x/Model-Based-Benchmarks
kwargs(dict): The other keyword arguments. | ||
|
||
Attributes: | ||
_env_id (str): The environment id. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private attributes may not need docs.
self._last_dynamics_update = 0 | ||
self._last_policy_update = 0 | ||
self._last_eval = 0 | ||
self._first_log = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self._first_log = False | |
self._first_log: bool = False |
The same with others.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some problems still exist, but it doesn't matter, I will open another PR to fix my issue and I will request your review.
"""Get lidar from numpy coordinate. | ||
|
||
Args: | ||
obs (np.ndarray): The observation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
obs (np.ndarray): The observation. | |
obs (torch.Tensor): The observation. |
else None | ||
) | ||
|
||
def render(self, *args: str, **kwargs: int) -> Any: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why the **kwargs
is int
type ?
}, | ||
) | ||
|
||
def _reset_log(self, idx: int | None = None) -> None: # pylint: disable=unused-argument |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why unused-argument idx
maintained ?
Open a fix request, then fix this code details. |
feat: add model-based algorithms
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!
make format
. (required)make lint
. (required)make test
pass. (required)