Skip to content

Allow empty tunable values to represent the defaults - #868

Merged
Brian Kroth (bpkroth) merged 5 commits into
microsoft:mainfrom
bpkroth:allow-empty-tunable-values-dict-to-represent-defaults
Oct 4, 2024
Merged

Brian Kroth (bpkroth) merged 5 commits into
microsoft:mainfrom
bpkroth:allow-empty-tunable-values-dict-to-represent-defaults

Conversation

@bpkroth

@bpkroth Brian Kroth (bpkroth) commented Oct 4, 2024 •

Copy link
Copy Markdown
Contributor

Pull Request

Title

Allows an empty dictionary (object) to represent the default tunable values for tunable params.


Description

This should make it easier to maintain configs that loop over a chosen set of tunable values, where some of the tunable values are the default values without needing to copy/paste those values from the tunable params definitions.


Type of Change

  • ✨ New feature

Testing

Extends existing testing infrastructure to check that this works.


@bpkroth
Brian Kroth (bpkroth) marked this pull request as ready for review October 4, 2024 16:40
@bpkroth
Brian Kroth (bpkroth) requested a review from a team as a code owner October 4, 2024 16:40
@bpkroth

Brian Kroth (bpkroth) commented Oct 4, 2024 •

Copy link
Copy Markdown
Contributor Author

As noted in the linked discussion, an alternative could be to allow null to represent the defaults, but this seemed reasonably clean.

Prior to this {} would basically be a no-op (i.e., doesn't change any of the values of the current config), which I guess also makes sense, but is also probably also confusing.

@motus

Copy link
Copy Markdown
Member

Looks good! Maybe, all one more unit test with some tunable values omitted to check that they are set to default and others are not?

@bpkroth

Copy link
Copy Markdown
Contributor Author

Looks good! Maybe, all one more unit test with some tunable values omitted to check that they are set to default and others are not?

I think that's handled already in the test I added. I made it a little bit more explicit just now as well.

@bpkroth
Brian Kroth (bpkroth) enabled auto-merge (squash) October 4, 2024 21:35
@bpkroth
Brian Kroth (bpkroth) merged commit dbaccea into microsoft:main Oct 4, 2024
@bpkroth
Brian Kroth (bpkroth) deleted the allow-empty-tunable-values-dict-to-represent-defaults branch October 4, 2024 21:47
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