-
Notifications
You must be signed in to change notification settings - Fork 4
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
Feature/misc improvements #190
Conversation
16d8d85
to
86f7687
Compare
98eea1a
to
418882a
Compare
agents = [ | ||
satellite.name | ||
for satellite in self.satellites | ||
if (satellite.is_alive() and not truncated) |
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.
Truncated is just one boolean for the episode and not for each satellite, right? I guess you could just check if it is truncated before iterating over the satellites to make it faster? Still, I am not sure if this has any practical advantages.
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.
I think this was copying some example from petting zoo. I don’t see that being a huge performance difference.
@@ -306,7 +311,18 @@ def _get_obs(self) -> MultiSatObs: | |||
Returns: | |||
tuple: Joint observation | |||
""" | |||
return tuple(satellite.get_obs() for satellite in self.satellites) | |||
if self.generate_obs_retasking_only: |
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.
Nice!
@@ -19,6 +19,7 @@ Development Version | |||
performance. | |||
* Add option to ``generate_obs_retasking_only`` to prevent computing observations for | |||
satellites that are continuing their current action. | |||
* Improve performance of :class:`~bsk_rl.obs.Eclipse` observations by about 95%. |
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.
Excellent change!
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.
Do we need to add the change in the access filters here?
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.
Sure, I'll note that it's possible to restrict access filters to only act on a certain type of opportunity. The base filter behavior should be the same.
75b7fce
to
c3901d3
Compare
86f7687
to
9a12127
Compare
c3901d3
to
7a05cbb
Compare
7a05cbb
to
b67c312
Compare
b67c312
to
69d2125
Compare
Added a docstring for a method that was missing one |
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.
Good changes and excellent performance improvement!
Description
Closes #189
Closes #185
Closes #188
Closes #187
Closes #191
Misc improvements. Review by commit.
Type of change
How should this pull request be reviewed?
How Has This Been Tested?
Tests updated.
Passes Tests
pytest --cov bsk_rl --cov-report term-missing tests/unittest
pytest --cov bsk_rl --cov-report term-missing tests/integration
cd docs; make html
Test Configuration
Checklist:
Issue #XXX: Message
and have a useful message