Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the TunableGroups.is_updated() logic #452

Merged
merged 5 commits into from
Jul 19, 2023

Conversation

motus
Copy link
Member

@motus motus commented Jul 19, 2023

Summary of changes:

  • Set the CovariantTunableGroup._is_updated flag only when assigning its tunables the data that is different from the tunables' current values.
  • Add unit tests to verify the new behavior of the TunableGroups.
  • In the Environment.setup() method, write to the log if the environment has to be reset due to the update to its tunables.

We will update the logic of the derived Environment classes in the subsequent PRs.

@motus motus requested a review from a team as a code owner July 19, 2023 01:35
@bpkroth
Copy link
Contributor

bpkroth commented Jul 19, 2023

Summary of changes:

  • Set the CovariantTunableGroup._is_updated flag only when assigning its tunables the data that is different from the tunables' current values.
  • Add unit tests to verify the new behavior of the TunableGroups.
  • In the Environment.setup() method, write to the log if the environment has to be reset due to the update to its tunables.

We will update the logic of the derived Environment classes in the subsequent PRs.

Awesome! I was encountering some of this recently as well. I think we can really improve the speed of trial repeats if we're only changing certain variables so we don't need to go through the full setup/teardown of the different environment levels.

It's going to get complicated when we start considering client/server split trees though, and we may need to implement some sort of "depends on" waiting feature at some point too, especially for parallel runs, but again - future work :)

@motus motus enabled auto-merge (squash) July 19, 2023 18:37
@motus
Copy link
Member Author

motus commented Jul 19, 2023

Yes, changing the tunables in one environment can affect other environments up the stack, and we have to handle that correctly. rn I am debugging exactly that for our Redis setup

Copy link
Contributor

@bpkroth bpkroth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@motus motus merged commit eb6205d into microsoft:main Jul 19, 2023
11 checks passed
@motus motus deleted the sergiym/tunable/update branch July 19, 2023 19:33
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.

2 participants