mirror of
https://github.com/wassname/optuna-dashboard.git
synced 2026-09-10 12:23:22 +08:00
Add documentation for get_artifact_path
This commit is contained in:
@@ -66,6 +66,7 @@ Artifact
|
||||
:nosignatures:
|
||||
|
||||
optuna_dashboard.artifact.upload_artifact
|
||||
optuna_dashboard.artifact.get_artifact_path
|
||||
optuna_dashboard.artifact.file_system.FileSystemBackend
|
||||
optuna_dashboard.artifact.boto3.Boto3Backend
|
||||
optuna_dashboard.artifact.backoff.Backoff
|
||||
|
||||
@@ -52,7 +52,18 @@ def get_artifact_path(
|
||||
study_or_trial: optuna.Trial | optuna.Study,
|
||||
artifact_id: str,
|
||||
) -> str:
|
||||
"""Get the URL path for a given artifact ID."""
|
||||
"""Get the URL path for a given artifact ID.
|
||||
|
||||
Args:
|
||||
study_or_trial:
|
||||
A Trial object, or a Study object.
|
||||
|
||||
artifact_id:
|
||||
An artifact ID.
|
||||
|
||||
Returns:
|
||||
A URL path to the artifact.
|
||||
"""
|
||||
if isinstance(study_or_trial, optuna.Study):
|
||||
study_id = study_or_trial._study_id
|
||||
return f"/artifacts/{study_id}/{artifact_id}"
|
||||
|
||||
Reference in New Issue
Block a user