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] Better error handling when core_worker missing for recording logs #39663

Merged

Conversation

rickyyx
Copy link
Contributor

@rickyyx rickyyx commented Sep 14, 2023

Why are these changes needed?

#37758

Related issue number

Closes #37758

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 :(

Signed-off-by: rickyyx <[email protected]>
@rickyyx rickyyx added the tests-ok The tagger certifies test failures are unrelated and assumes personal liability. label Sep 14, 2023
Copy link
Contributor

@rkooo567 rkooo567 left a comment

Choose a reason for hiding this comment

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

LGTM. I think we should make self.core_worker to be a property instead in the longer term...

@rickyyx
Copy link
Contributor Author

rickyyx commented Sep 15, 2023

LGTM. I think we should make self.core_worker to be a property instead in the longer term...

I tried in this PR actually - i think it's not a huge improvement, instead of calling if hasattr(workrer, "core_worker") we will do if worker.core_worker

@rkooo567
Copy link
Contributor

I think the property could just raise an exception instead?

@rickyyx
Copy link
Contributor Author

rickyyx commented Sep 17, 2023

I think the property could just raise an exception instead?

Then it will be similar with current approach right? When an attribute of core_worker not found, it will also just raise an exception.

@rkooo567
Copy link
Contributor

Then it will be similar with current approach right? When an attribute of core_worker not found, it will also just raise an exception.

Yeah it is .But we don't need to write if not hasattr(self, "core_worker"): everywhere?

@rickyyx
Copy link
Contributor Author

rickyyx commented Sep 21, 2023

Then it will be similar with current approach right? When an attribute of core_worker not found, it will also just raise an exception.

Yeah it is .But we don't need to write if not hasattr(self, "core_worker"): everywhere?

I guess we could always don't check the existence of the attribute and let it raise exception.

@rickyyx rickyyx merged commit 75a68c0 into ray-project:master Sep 22, 2023
82 of 85 checks passed
simonsays1980 pushed a commit to simonsays1980/ray that referenced this pull request Sep 26, 2023
vymao pushed a commit to vymao/ray that referenced this pull request Oct 11, 2023
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.

[Core] better failure handling during worker exit
3 participants