Skip to content

feat(runtime): support mapping-based scheduler configs - #1523

Open
tigerwang22 wants to merge 1 commit into
RIDE-Lab:mainfrom
tigerwang22:feat/scheduler-mapping-config
Open

feat(runtime): support mapping-based scheduler configs#1523
tigerwang22 wants to merge 1 commit into
RIDE-Lab:mainfrom
tigerwang22:feat/scheduler-mapping-config

Conversation

@tigerwang22

Copy link
Copy Markdown

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:

  • accepts scheduler mappings via type, name, or kind
  • normalizes common aliases such as load-aware / load aware
  • passes through LoadAwareScheduler options like strategy and max_concurrent
  • adds focused contract tests for valid and invalid mapping configs

I kept the scope intentionally small:

  • no change to the existing string-based scheduler API
  • no change to scheduling semantics outside the new config parsing path
  • tests are limited to the local runtime consolidation suite

Validation used for this patch:

  • 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

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.

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
@tigerwang22

Copy link
Copy Markdown
Author

Hi team, any update on this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant