ray icon indicating copy to clipboard operation
ray copied to clipboard

[core] Control whether to construct a default concurrency group executor when max-concurrency=1 and there are other concurrency groups for an actor

Open caican00 opened this issue 6 months ago • 2 comments

Why are these changes needed?

If use ray actor to perform some obstructive operations, and these operations contain logic that must be executed in the main thread, such as executing python's signal.signal(sigterm, handler), this requires execution in the main thread.

Therefore, it can be controlled through a parameter that when max-concurrency=1 of an actor and there are other concurrency_groups simultaneously for this actor, the default concurrency group executor is not initialized. And the specified actor tasks can be executed in the main thread and the other actor tasks can be executed in the corresponding concurrency group executors.

Related issue number

https://github.com/ray-project/ray/issues/53771

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
    • [ ] This PR is not tested :(

caican00 avatar Jun 12 '25 07:06 caican00

Hi @ericl,may i ask if you could help review this pr? Thank you!

caican00 avatar Jun 12 '25 10:06 caican00

Hi @scv119 ,may i ask if you could help review this pr? Thank you!

caican00 avatar Jun 16 '25 10:06 caican00

This pull request has been automatically marked as stale because it has not had any activity for 14 days. It will be closed in another 14 days if no further activity occurs. Thank you for your contributions.

You can always ask for help on our discussion forum or Ray's public slack channel.

If you'd like to keep this open, just leave any comment, and the stale label will be removed.

github-actions[bot] avatar Jul 01 '25 12:07 github-actions[bot]

This pull request has been automatically closed because there has been no more activity in the 14 days since being marked stale.

Please feel free to reopen or open a new pull request if you'd still like this to be addressed.

Again, you can always ask for help on our discussion forum or Ray's public slack channel.

Thanks again for your contribution!

github-actions[bot] avatar Jul 16 '25 00:07 github-actions[bot]