optuna_dashboard.artifact.file_system.FileSystemBackend

class optuna_dashboard.artifact.file_system.FileSystemBackend(base_path)

An artifact backend for file systems.

Warning

This class is deprecated. Please use optuna.artifacts.FileSystemArtifactStore instead.

Example

import optuna
from optuna_dashboard.artifact import upload_artifact
from optuna_dashboard.artifact.file_system import FileSystemBackend

artifact_backend = FileSystemBackend("./artifacts")

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:

base_path (str) –