Refactor Scheduler schema definitions to make it easier to add new ones.#979
Merged
motus merged 3 commits intomicrosoft:mainfrom May 20, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors scheduler schema definitions by extracting common base config properties, introducing a dedicated subschema for the SyncScheduler, and updating the top-level scheduler schema to compose these subschemas.
- Extracted shared scheduler config properties into
base-scheduler-subschema.json - Added
sync-scheduler-subschema.jsonfor SyncScheduler-specific config - Refactored
scheduler-schema.jsonto useallOf/oneOfcomposition instead of inlineif/then
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| mlos_bench/.../sync-scheduler-subschema.json | New subschema defining SyncScheduler class & config |
| mlos_bench/.../scheduler-schema.json | Top-level schema now composes base and sync subschemas |
| mlos_bench/.../base-scheduler-subschema.json | New base subschema with common scheduler config defs |
Comments suppressed due to low confidence (1)
mlos_bench/mlos_bench/config/schemas/schedulers/base-scheduler-subschema.json:1
- The new base scheduler subschema isn’t yet covered by any validation tests. Consider adding unit tests that load and validate this schema to catch regressions early.
{
mlos_bench/mlos_bench/config/schemas/schedulers/sync-scheduler-subschema.json
Show resolved
Hide resolved
motus
approved these changes
May 19, 2025
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.
Pull Request
Title
Refactor Scheduler schema definitions to make it easier to add new ones.
Description
Simple refactor of the Scheduler schemas to allow making new ones as a copy/edit of the
synchscheduler-subschema.json.Type of Change
Testing
mlos_benchnext.Additional Notes (optional)
MockSchedulernext, thenParallelSchedulerin WIP: Parallel Trial Scheduler #971.