Skip to content

Commit

Permalink
Merge pull request #463 from c-bata/avoid-use-deprecated-private-attr…
Browse files Browse the repository at this point in the history
…ibute

Avoid to use `trial._study_id` and use `trial.study._study_id` instead
  • Loading branch information
c-bata authored May 17, 2023
2 parents 935ef79 + fbc5d65 commit 7a18a54
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions optuna_dashboard/artifact/_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def get_artifact_path(
artifact_id: str,
) -> str:
"""Get the URL path for a given artifact ID."""
study_id = trial._study_id
study_id = trial.study._study_id
trial_id = trial._trial_id
return f"/artifacts/{study_id}/{trial_id}/{artifact_id}"

Expand Down Expand Up @@ -148,7 +148,7 @@ def objective(trial: optuna.Trial) -> float:
filename = os.path.basename(file_path)
storage = trial.storage
trial_id = trial._trial_id
study_id = trial._study_id
study_id = trial.study._study_id
artifact_id = str(uuid.uuid4())
guess_mimetype, guess_encoding = mimetypes.guess_type(filename)
artifact: ArtifactMeta = {
Expand Down

0 comments on commit 7a18a54

Please sign in to comment.