mirror of
https://github.com/wassname/optuna-dashboard.git
synced 2026-10-29 13:20:48 +08:00
Remove deprecation warnings
This commit is contained in:
1 parent
d7c7791728
commit
06a0d5d3bb
4 files changed
+21
-9
No files matched your search
@@ -84,9 +84,12 @@ def test_delete_all_artifacts(init_storage_with_artifact_meta: MagicMock) -> Non
|
||||
|
||||
def test_list_trial_artifacts(init_storage_with_artifact_meta: MagicMock) -> None:
|
||||
storage = init_storage_with_artifact_meta
|
||||
trial = MagicMock(_trial_id=0, system_attrs=storage.get_trial_system_attrs(0))
|
||||
trial_system_attrs = storage.get_trial_system_attrs(0)
|
||||
trial = MagicMock(_trial_id=0, system_attrs={})
|
||||
|
||||
actual = _backend.list_trial_artifacts(storage.get_study_system_attrs(0), trial)
|
||||
actual = _backend.list_trial_artifacts(
|
||||
storage.get_study_system_attrs(0), trial_system_attrs, trial
|
||||
)
|
||||
assert actual == [
|
||||
{"artifact_id": "id0", "filename": "foo.txt"},
|
||||
{"artifact_id": "id1", "filename": "bar.txt"},
|
||||
|
||||
@@ -36,8 +36,11 @@ def test_list_optuna_trial_artifacts() -> None:
|
||||
study.tell(trial, 0.0)
|
||||
|
||||
study_system_attrs = storage.get_study_system_attrs(study._study_id)
|
||||
trial_system_attrs = storage.get_trial_system_attrs(trial._trial_id)
|
||||
frozen_trial = storage.get_trial(trial._trial_id)
|
||||
artifact_meta_list = list_trial_artifacts(study_system_attrs, frozen_trial)
|
||||
artifact_meta_list = list_trial_artifacts(
|
||||
study_system_attrs, trial_system_attrs, frozen_trial
|
||||
)
|
||||
assert len(artifact_meta_list) == 1
|
||||
|
||||
artifact_id = artifact_meta_list[0]["artifact_id"]
|
||||
|
||||
Reference in new issue
Block a user