From 2cf12457d5d38eafc471117c9b754503621871fb Mon Sep 17 00:00:00 2001 From: Shinichi Hemmi <50256998+Alnusjaponica@users.noreply.github.com> Date: Thu, 17 Aug 2023 15:56:11 +0900 Subject: [PATCH] Remove unused argument --- optuna_dashboard/artifact/_backend.py | 5 ++--- python_tests/artifact/test_optuna_compatibility.py | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/optuna_dashboard/artifact/_backend.py b/optuna_dashboard/artifact/_backend.py index f8f60569..a26e6af8 100644 --- a/optuna_dashboard/artifact/_backend.py +++ b/optuna_dashboard/artifact/_backend.py @@ -66,7 +66,7 @@ def register_artifact_route( if artifact_store is None: response.status = 400 # Bad Request return b"Cannot access to the artifacts." - artifact_dict = get_artifact_meta(storage, study_id, trial_id, artifact_id) + artifact_dict = get_artifact_meta(storage, trial_id, artifact_id) if artifact_dict is None: response.status = 404 return b"Not Found" @@ -169,7 +169,6 @@ def upload_artifact( filename = os.path.basename(file_path) storage = trial.storage trial_id = trial._trial_id - study_id = trial.study._study_id artifact_id = str(uuid.uuid4()) guess_mimetype, guess_encoding = mimetypes.guess_type(filename) artifact: ArtifactMeta = { @@ -187,7 +186,7 @@ def upload_artifact( def get_artifact_meta( - storage: BaseStorage, study_id: int, trial_id: int, artifact_id: str + storage: BaseStorage, trial_id: int, artifact_id: str ) -> Optional[ArtifactMeta]: trial_system_attr = storage.get_trial_system_attrs(trial_id) attr_key = ARTIFACTS_ATTR_PREFIX + artifact_id diff --git a/python_tests/artifact/test_optuna_compatibility.py b/python_tests/artifact/test_optuna_compatibility.py index d81e1397..52032ae1 100644 --- a/python_tests/artifact/test_optuna_compatibility.py +++ b/python_tests/artifact/test_optuna_compatibility.py @@ -46,7 +46,6 @@ def test_list_optuna_trial_artifacts() -> None: artifact_meta = get_artifact_meta( storage=storage, - study_id=study._study_id, trial_id=trial._trial_id, artifact_id=artifact_id, )