optuna_dashboard.save_note

optuna_dashboard.save_note(study_or_trial, body)

Save the note (Markdown format) to the Study or Trial.

Example

import optuna
from optuna_dashboard import save_note


def objective(trial: optuna.Trial) -> float:
    x1 = trial.suggest_float("x1", 0, 10)

    save_note(trial, textwrap.dedent(f'''              ## Trial {trial.number}

    You can *freely* take a **note** that is associated with the Trial.
    '''))
    return (x1 - 2) ** 2


study = optuna.create_study()
save_note(study, textwrap.dedent(f'''          ## {study.study_name}

You can *freely* take a **note** that is associated with the study.
'''))
study.optimize(objective, n_trials=10)
Parameters:
  • study_or_trial (Study | Trial)

  • body (str)

Return type:

None