ray icon indicating copy to clipboard operation
ray copied to clipboard

[Core] Handle `TypeError` when `RayTaskError.cause` is a `BaseExceptionGroup`

Open Atry opened this issue 1 year ago • 1 comments

Why are these changes needed?

TypeError can be raised from __new__ when the cause is a BaseExceptionGroup. Therefore, this PR moves the instantiation into the try block so that TypeError raised from __new__ can be handled.

Related issue number

Closes https://github.com/ray-project/ray/issues/45520

Checks

  • [x] I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • [x] 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.
  • [x] 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
    • [x] This PR is not tested :(

Atry avatar May 23 '24 14:05 Atry

cc @jjyao to take a look and merge. Also we may want to support ExceptionGroups later.

rynewang avatar May 25 '24 00:05 rynewang

@rynewang As follow-up, we need to add tests and properly support BaseExceptionGroup

jjyao avatar May 30 '24 23:05 jjyao