chore: run tests for importance only with in-memory#6109
Merged
HideakiImamura merged 1 commit intooptuna:masterfrom May 31, 2025
Merged
chore: run tests for importance only with in-memory#6109HideakiImamura merged 1 commit intooptuna:masterfrom
HideakiImamura merged 1 commit intooptuna:masterfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the importance tests to run only against the in-memory storage backend, removing all parametrization over different storage modes. Key changes:
- Deleted imports and uses of
STORAGE_MODESandStorageSupplier - Updated all
create_studycalls to rely on the default (in-memory) storage - Removed
storage_modeparameter from test function signatures and decorators
Comments suppressed due to low confidence (1)
tests/importance_tests/test_init.py:50
- Tests now only run with in-memory storage and no longer cover other storage backends. Ensure that other storage modes are tested elsewhere or explicitly document this change to avoid gaps in storage-agnostic behavior coverage.
study = create_study(directions=["minimize", "minimize"])
Alnusjaponica
approved these changes
May 31, 2025
Contributor
Alnusjaponica
left a comment
There was a problem hiding this comment.
LGTM. Thanks for your contribution.
HideakiImamura
approved these changes
May 31, 2025
Member
HideakiImamura
left a comment
There was a problem hiding this comment.
Amazing speedup!!! LGTM!!!
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.
Motivation
Some parts of importance test (
test_init.py) comprehensively run on available storages in Optuna. But the logic is basically storage class agnostic. This PR makes the run happen only with in-memory storage.Description of the changes
Before
After