Skip to content

[rllib] Better document which methods are abstract and which ones are overrides#3480

Merged
ericl merged 15 commits into
ray-project:masterfrom
ericl:override
Dec 9, 2018
Merged

[rllib] Better document which methods are abstract and which ones are overrides#3480
ericl merged 15 commits into
ray-project:masterfrom
ericl:override

Conversation

@ericl

@ericl ericl commented Dec 6, 2018

Copy link
Copy Markdown
Contributor

What do these changes do?

In the internal APIs for better or worse there are a lot of abstract classes. This can result in code being hard to understand unless you know there is a method being overriden.

This PR adds an @abstractmethod and @override decorators for documentation purposes (think of them as similar to adding a comment that a method is abstract or is overriding something. The override(cls) decorator also checks that the target class actually has the method to help catch simple mistakes.

Also, it moves around methods around to more consistently order by {overrides, abstract methods, private methods} for readability

@AmplabJenkins

Copy link
Copy Markdown

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/9791/
Test PASSed.

@AmplabJenkins

Copy link
Copy Markdown

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/9790/
Test FAILed.

@AmplabJenkins

Copy link
Copy Markdown

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/9811/
Test FAILed.

@AmplabJenkins

Copy link
Copy Markdown

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/9812/
Test FAILed.

Comment thread python/ray/rllib/utils/annotations.py Outdated
Comment thread python/ray/rllib/optimizers/async_samples_optimizer.py
Comment thread python/ray/rllib/optimizers/async_replay_optimizer.py Outdated
@AmplabJenkins

Copy link
Copy Markdown

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/9857/
Test FAILed.

@AmplabJenkins

Copy link
Copy Markdown

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/9858/
Test FAILed.

@AmplabJenkins

Copy link
Copy Markdown

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/9869/
Test FAILed.

@AmplabJenkins

Copy link
Copy Markdown

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/9875/
Test FAILed.

@ericl ericl added the tests-ok The tagger certifies test failures are unrelated and assumes personal liability. label Dec 9, 2018
@ericl ericl merged commit 8b5827b into ray-project:master Dec 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests-ok The tagger certifies test failures are unrelated and assumes personal liability.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants