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

[core] Fix wrong return type on get_actor in the state api #48695

Merged
merged 2 commits into from
Nov 14, 2024

Conversation

miguelteixeiraa
Copy link
Contributor

Why are these changes needed?

ray.util.state.get_actor currently have a type annotation specifying that the function should return an Optional[Dict] but it actually returns ActorState (as the Docstring speficies). This pull request simply changes this type annotation.

Related issue number

Closes #48694

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • 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 added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • 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 :(

@rynewang rynewang enabled auto-merge (squash) November 13, 2024 01:11
@github-actions github-actions bot added the go add ONLY when ready to merge, run all tests label Nov 13, 2024
@miguelteixeiraa
Copy link
Contributor Author

These failed tests seem flaky. We might need to rerun buildkite/premerge

@github-actions github-actions bot disabled auto-merge November 14, 2024 00:40
@rynewang rynewang merged commit 0b38051 into ray-project:master Nov 14, 2024
5 checks passed
dentiny pushed a commit to dentiny/ray that referenced this pull request Dec 7, 2024
…ct#48695)

ray.util.state.get_actor currently have a type annotation specifying
that the function should return an Optional[Dict] but it actually
returns
[ActorState](https://github.com/ray-project/ray/blob/3141dfe4031cc715515b365278cd1d6b8955154e/python/ray/util/state/common.py#L416)
(as the Docstring speficies). This pull request simply changes this type
annotation.


Signed-off-by: Miguel Teixeira <[email protected]>
Signed-off-by: hjiang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go add ONLY when ready to merge, run all tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Core] Wrong return type annotation in ray.util.state.get_actor
2 participants