optuna_dashboard.artifact.boto3.Boto3Backend
- class optuna_dashboard.artifact.boto3.Boto3Backend(bucket_name, client=None, *, avoid_buf_copy=False)
An artifact backend for S3.
Warning
This class is deprecated. Please use optuna.artifacts.Boto3ArtifactStore instead.
Example
import optuna from optuna_dashboard.artifact import upload_artifact from optuna_dashboard.artifact.boto3 import Boto3Backend artifact_backend = Boto3Backend("my-bucket") def objective(trial: optuna.Trial) -> float: ... = trial.suggest_float("x", -10, 10) file_path = generate_example_png(...) upload_artifact(artifact_backend, trial, file_path) return ...
Methods
open
(artifact_id)remove
(artifact_id)write
(artifact_id, content_body)- Parameters:
bucket_name (str) –
client (Optional[S3Client]) –
avoid_buf_copy (bool) –