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

Add tests for mixed numerical type conversions of tunable config data from storage #670

Merged
merged 7 commits into from
Feb 9, 2024

Conversation

bpkroth
Copy link
Contributor

@bpkroth bpkroth commented Feb 8, 2024

Closes #669

@bpkroth bpkroth requested a review from a team as a code owner February 8, 2024 23:10
@bpkroth bpkroth enabled auto-merge (squash) February 8, 2024 23:10
@bpkroth bpkroth added ready for review Ready for review tests Add or fix unit tests labels Feb 9, 2024
Copy link
Member

@motus motus left a comment

Choose a reason for hiding this comment

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

Looks good + a few nitpicks.

P.S. I don't quite like that the mixed_numerics_exp_storage fixture returns an experiment detached from its context (i.e., after Experiment._teardown() has been called internally), but I guess that's ok for tests. I'll think about it later.

mlos_bench/mlos_bench/tests/storage/sql/fixtures.py Outdated Show resolved Hide resolved
mlos_bench/mlos_bench/tests/storage/sql/fixtures.py Outdated Show resolved Hide resolved
mlos_bench/mlos_bench/tests/storage/sql/fixtures.py Outdated Show resolved Hide resolved
@bpkroth
Copy link
Contributor Author

bpkroth commented Feb 9, 2024

Looks good + a few nitpicks.

P.S. I don't quite like that the mixed_numerics_exp_storage fixture returns an experiment detached from its context (i.e., after Experiment._teardown() has been called internally), but I guess that's ok for tests. I'll think about it later.

I actually copied that one from your original exp_storage example.
I think the way that pytest handles that is that the context doesn't actually exit until the fixture is no longer in scope.
That pattern is also used for our docker based tests.

@bpkroth bpkroth disabled auto-merge February 9, 2024 22:52
@bpkroth bpkroth enabled auto-merge (squash) February 9, 2024 23:03
@bpkroth
Copy link
Contributor Author

bpkroth commented Feb 9, 2024

Looks good + a few nitpicks.
P.S. I don't quite like that the mixed_numerics_exp_storage fixture returns an experiment detached from its context (i.e., after Experiment._teardown() has been called internally), but I guess that's ok for tests. I'll think about it later.

I actually copied that one from your original exp_storage example. I think the way that pytest handles that is that the context doesn't actually exit until the fixture is no longer in scope. That pattern is also used for our docker based tests.

Actually, we might need to use yield for that instead. Let's take that up in the next PR.

@bpkroth bpkroth merged commit 067f05c into microsoft:main Feb 9, 2024
12 checks passed
@bpkroth bpkroth deleted the bug-669-additional-tests branch February 9, 2024 23:12
@bpkroth bpkroth mentioned this pull request Feb 12, 2024
bpkroth added a commit that referenced this pull request Feb 12, 2024
Fixups to address discussions in #670
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review Ready for review tests Add or fix unit tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add tests for kv_df_to_dict and mixed integer types
2 participants