Fix request.values in OptunaStorageProxyService#6044
Fix request.values in OptunaStorageProxyService#6044HideakiImamura merged 22 commits intooptuna:masterfrom
OptunaStorageProxyService#6044Conversation
f362bea to
bb3b8c8
Compare
|
Let me mark this PR as a draft. Please mark as ready for review after CI passes. |
|
Added tests for cases where set and get behave differently depending on whether a gRPC proxy is present. |
not522
left a comment
There was a problem hiding this comment.
Thank you for your PR!
It seems to be many changes for tests. Could you narrow down the changes to those related to bug fixes?
|
|
||
| @pytest.mark.parametrize("storage_mode_direct", STORAGE_MODES_DIRECT) | ||
| @pytest.mark.parametrize("values", [None, [0.0]]) | ||
| def test_set_and_get_trial_state_values_through_grpc_proxy( |
There was a problem hiding this comment.
I think that this test should be in tests/storages_tests/test_grpc.py.
|
ok |
Co-authored-by: Eri Sawada <125344906+sawa3030@users.noreply.github.com>
|
actions workflows have not been running... |
c-bata
left a comment
There was a problem hiding this comment.
Thank you for your pull request. Let me leave some early feedback comments.
optuna/testing/storages.py
Outdated
| ) -> None: | ||
| self.storage_specifier = storage_specifier | ||
| if base_storage is not None: | ||
| assert storage_specifier == "grpc_proxy" |
There was a problem hiding this comment.
My initial impression is that it could potentially be a bit confusing that storage_specifiers accepts "grpc_proxy", even though "grpc_rdb" and "grpc_journal_file" still exist. I have no idea how to mitigate this right now. Therefore, I'll comment later with a suggested solution.
There was a problem hiding this comment.
I've been thinking about it, but I could not come up with a simple solution.
It seems that larger changes might be needed, which should not be addressed in this PR. Considering that this bug fix should be included in the next minor release, I will merge this PR first and then considering whether to submit a follow-up PR.
I apologize for the delayed review. I will proceed with merging this.
optuna/testing/storages.py
Outdated
| ) -> None: | ||
| self.storage_specifier = storage_specifier | ||
| if base_storage is not None: | ||
| assert storage_specifier == "grpc_proxy" |
There was a problem hiding this comment.
I've been thinking about it, but I could not come up with a simple solution.
It seems that larger changes might be needed, which should not be addressed in this PR. Considering that this bug fix should be included in the next minor release, I will merge this PR first and then considering whether to submit a follow-up PR.
I apologize for the delayed review. I will proceed with merging this.
|
@sawa3030 please let me know once you have completed your review. |
|
Apologies for the delay. I am considering making only minimal changes to |
Motivation
Recording
Nonethrough aGrpcStorageProxyresults in [] being recorded in backend DB.Loading [] from the DB through
GrpcStorageProxyresults in None being loaded.Saving and loading without
GrpcStorageProxydoes not change.fix this so the value never changes
Description of the changes
First, add test to check to fail.
Next, fix bug.