Introduce mock_trial_data for MockEnv and add some basic Scheduler tests#980
Draft
bpkroth wants to merge 84 commits intomicrosoft:mainfrom
Draft
Introduce mock_trial_data for MockEnv and add some basic Scheduler tests#980bpkroth wants to merge 84 commits intomicrosoft:mainfrom
bpkroth wants to merge 84 commits intomicrosoft:mainfrom
Conversation
for more information, see https://pre-commit.ci
…cheduler config examples.
for more information, see https://pre-commit.ci
motus
added a commit
that referenced
this pull request
May 20, 2025
…cheduler config examples (#981) # Pull Request ## Title Refactor some test fixtures for better reuse so we can test loading Scheduler config examples ______________________________________________________________________ ## Description - Moves temporary file based sqlite Storage fixture to a reusable location. - Move Optimizer fixtures to reusable location following Storage fixtures pattern. - Uses both in setting up TrialRunner fixtures for testing Scheduler config examples. - Also be sure to load all test configs too. ______________________________________________________________________ ## Type of Change - 🔄 Refactor - 🧪 Tests ______________________________________________________________________ ## Testing - Introduces new CI test for Scheduler configs that follows the usual pattern for other objects (Storage, Optimizer, Environments, Services, etc.) ______________________________________________________________________ ## Additional Notes (optional) - Split out from #980, #973 ______________________________________________________________________ --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Sergiy Matusevych <sergiym@microsoft.com>
bpkroth
commented
May 20, 2025
mlos_bench/mlos_bench/tests/config/schedulers/test_load_scheduler_config_examples.py
Outdated
Show resolved
Hide resolved
…ler_config_examples.py
bpkroth
commented
May 22, 2025
| trial_data, | ||
| ), f"Trial {trial_id} was not registered in the optimizer." | ||
|
|
||
| # TODO: And check the intermediary results. |
Contributor
Author
There was a problem hiding this comment.
Thinking I will push this part off to #973. Thoughts?
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
bpkroth
commented
May 27, 2025
| from mlos_bench.storage.sql.trial import Trial | ||
| from mlos_bench.tunables.tunable_groups import TunableGroups | ||
| from mlos_bench.util import utcify_timestamp | ||
| from mlos_bench.util import try_parse_val, utcify_timestamp |
Contributor
Author
There was a problem hiding this comment.
Work to return numeric values for metrics and configs if possible.
TODO: Split this change out to a separate PR.
bpkroth
commented
May 27, 2025
| Column("ts_start", DateTime), | ||
| Column("ts_end", DateTime), | ||
| Column("ts_start", DateTime().with_variant(mysql.DATETIME(fsp=6), "mysql")), | ||
| Column("ts_end", DateTime().with_variant(mysql.DATETIME(fsp=6), "mysql")), |
Contributor
Author
There was a problem hiding this comment.
Work to allow MySQL to store fraction time.
TODO: Split this out to its own PR
bpkroth
commented
May 27, 2025
| "trial_runner_id": None, | ||
| "experiment_id": "SomeExperimentName", | ||
| "trial_id": 1, | ||
| "trial_runner_id": 0, |
Contributor
Author
There was a problem hiding this comment.
Changes to handle a non-null trial_id requirement for MockEnv
Contributor
Author
There was a problem hiding this comment.
TODO: Maybe split this out to its own PR too.
motus
added a commit
that referenced
this pull request
Jun 12, 2025
# Pull Request ## Title Small refactor to `Status.parse` ______________________________________________________________________ ## Description - Rename `Status.from_dict` -> `Status.parse` - Allow `Status.parse` to accept a `Status` as an argument and return it as is. (complete convenience for some python comprehension code elsewhere) - Add a test for that. ______________________________________________________________________ ## Type of Change - 🔄 Refactor ______________________________________________________________________ ## Testing Small new CI check and existing tests. ______________________________________________________________________ ## Additional Notes (optional) For convenience in another PR - #980 ______________________________________________________________________ --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Sergiy Matusevych <sergiym@microsoft.com>
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
Introduce
mock_trial_dataand add some basic Scheduler testsDescription
mock_trial_datatoMockEnvto allow testing changes to the base class more explicitly.TODO: Split out:
Type of Change
Testing
Additional Notes (optional)
Status.parse#982 first.