feat(runtime): support mapping-based scheduler configs - #1523
Open
tigerwang22 wants to merge 1 commit into
Open
Conversation
Cause: environments currently accept scheduler strings or ready-made scheduler objects, which makes policy-driven runtime configuration harder to express consistently. Change: let resolve_scheduler() accept mapping configs via type/name/kind, normalize common load-aware aliases, and pass through LoadAwareScheduler options such as strategy and max_concurrent. Validation: python3 -m compileall src/sage/runtime/scheduler.py src/tests/test_runtime_local_consolidation.py; PYTHONPATH=/private/tmp/sage-testdeps:src python3 -m pytest src/tests/test_runtime_local_consolidation.py -q -k scheduler
Author
|
Hi team, any update on this PR? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a small runtime API ergonomics improvement around scheduler selection.
Today Environment setup effectively accepts either a scheduler string or a pre-built scheduler object. That works, but it makes policy-driven configuration a bit awkward when the caller already has structured config data.
This change lets resolve_scheduler() accept mapping-based configs in addition to the existing string/object forms. In particular it:
I kept the scope intentionally small:
Validation used for this patch:
One note: there is a separate pre-existing failure in test_local_environment_round_robins_unkeyed_parallel_map_locally when running the entire file. This PR does not touch that behavior, so I kept validation scoped to the scheduler tests only.