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

[RLlib; Docs overhaul] Docstring cleanup: Evaluation #19783

Merged

Conversation

sven1977
Copy link
Contributor

@sven1977 sven1977 commented Oct 27, 2021

Docstring cleanup: rllib/evaluation folder.

  • soft-renamed MultiAgentEpisode to Episode ("MultiAgentEpisode" implies there is also a single-agent one).
  • Cleanup docstrings.
  • Remove type hints in Args list (already in the signature).
  • Remve type hint from "Returns" (already in signature).
  • Add docstrings where missing.
  • Re-sort some class methods (by their importance, private/public, deprecated, etc..).

Why are these changes needed?

Related issue number

Checks

  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

Copy link
Member

@gjoliver gjoliver left a comment

Choose a reason for hiding this comment

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

just 1 quick question.
I like the renaming a lot.

@@ -200,29 +242,55 @@ def last_action_for(self,
@DeveloperAPI
def prev_action_for(self,
agent_id: AgentID = _DUMMY_AGENT_ID) -> EnvActionType:
"""Returns the previous action for the specified agent."""
"""Returns the previous action for the specified agent, or zeros.
Copy link
Member

Choose a reason for hiding this comment

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

actually what's the diff between last_action_for and prev_action_for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question:
last_action = action taken most recently by agent X.
prev_action = action taken one before the most recent one by agent X.

I'll add this explanation. ...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

…_docstring_cleanup_evaluation

# Conflicts:
#	rllib/agents/callbacks.py
#	rllib/policy/policy.py
#	rllib/policy/tf_policy.py
Copy link
Member

@gjoliver gjoliver left a comment

Choose a reason for hiding this comment

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

nice!

…_docstring_cleanup_envs

# Conflicts:
#	rllib/agents/callbacks.py
…_docstring_cleanup_evaluation

# Conflicts:
#	rllib/agents/callbacks.py
#	rllib/evaluation/rollout_worker.py
#	rllib/evaluation/worker_set.py
@sven1977 sven1977 merged commit 9c73871 into ray-project:master Oct 29, 2021
rkooo567 added a commit to rkooo567/ray that referenced this pull request Oct 29, 2021
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.

2 participants