Skip to content

Releases: optuna/optuna-dashboard

v0.10.1b2

08 Jun 01:36
17f997e
Compare
Choose a tag to compare
v0.10.1b2 Pre-release
Pre-release

What's Changed

  • Revert SupportsRead and use BinaryIO again by @c-bata in #489
  • Bump the version up to v0.10.1b2 by @c-bata in #490

Full Changelog: v0.10.1b1...v0.10.1b2

v0.10.1b1

05 Jun 03:55
11bcc02
Compare
Choose a tag to compare
v0.10.1b1 Pre-release
Pre-release

What's Changed

  • Simplify _app.py by separating some storage related logic. by @c-bata in #477
  • Add type ignore comment for JSONSerializable by @c-bata in #480
  • Reduce the number of memory allocation on artifact backend. by @c-bata in #481
  • Add ArtifactNotFound exception by @c-bata in #482
  • Bump the version up to v0.10.1b1 by @c-bata in #483

Full Changelog: v0.10.0...v0.10.1b1

v0.10.0

25 May 10:04
b919c6f
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.9.2...v0.10.0

v0.10.0b1

15 May 00:33
be6eb01
Compare
Choose a tag to compare
v0.10.0b1 Pre-release
Pre-release

What's Changed

Full Changelog: v0.9.2...v0.10.0b1

v0.9.2

10 May 00:55
f34bd66
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.9.1...v0.9.2

v0.9.1

13 Apr 05:42
ea4b294
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.9.0...v0.9.1

v0.9.0

14 Mar 07:58
c422eae
Compare
Choose a tag to compare

Highlights

An Experimental New UI

An experimental new UI is available as an opt-in feature - simply launch the dashboard as usual and click the link to the new UI.

experimental-new-ui

Please try it out and share your thoughts with us via the GitHub Discussion 👇
Feedback Survey: The New UI for Optuna Dashboard #332 - Optuna Dashboard

dashboard-new-ui

What's Changed

  • Upgrade to React 18 by @c-bata in #309
  • Use skip_table_creation when using Optuna v3 or later by @c-bata in #320
  • Remove typing_extensions from the dependencies by @c-bata in #321
  • Use type hinting generics. by @c-bata in #322
  • Update js dependencies by @c-bata in #323
  • Run npm audit fix by @c-bata in #324
  • Fix warning for the use of ReactDOM.render() by @c-bata in #325
  • Remove e.preventDefault by @c-bata in #327
  • New Dashboard UI. by @c-bata in #328
  • Make a lot of improvements in the new Dashboard UI by @c-bata in #329
  • Add follow-up changes for #329 by @c-bata in #330
  • Fix bug of markdown editor and add mathjax support. by @c-bata in #331
  • Link to the GitHub Discussion for the feedback survey by @c-bata in #333
  • Bump the version up to 0.9.0b1 by @c-bata in #334
  • Add Python API to save the note by @c-bata in #337
  • Add API to set objective names by @c-bata in #338
  • Handle exceptions in optuna-fast-fanova by @c-bata in #339
  • Fix the link to feedback survey by @c-bata in #340
  • Use type instead of interface by @c-bata in #342
  • Change Chip's colors and show durations by @c-bata in #343
  • Customize TrialTable for new ui by @c-bata in #344
  • Support trial user attributes on GraphHistory by @c-bata in #341
  • Add button to rename study by @c-bata in #345
  • Fix target arg for importance by @c-bata in #346
  • Select multiple trials by Shift + Click by @c-bata in #347
  • Make plot components faster and robust. by @c-bata in #348
  • Fix seed visual regression tests by @c-bata in #349
  • Simplify Python API to save notes by @c-bata in #350
  • Improve graph components by @c-bata in #351
  • Fix the link to trial detail page by @c-bata in #352
  • Support fixed_params by @c-bata in #353
  • Filter TrialState for GraphIntermediateValues by @c-bata in #310
  • Fix bug of multiple select trials by @c-bata in #356
  • Plot the hyperparameter importances for each objective value on a single bar chart. by @c-bata in #357
  • Add global state filters for History and IntermediateValue plots by @c-bata in #358
  • Use theme.typography.fontWeightBold instead of 600 by @c-bata in #359
  • Remove paddingTop from CardAction on StudyList by @c-bata in #361
  • Bump the version up to v0.9.0b2 by @c-bata in #360
  • Add state filters in TrialList by @c-bata in #363
  • Hide user_attrs on GraphParallelCoordinate by default by @c-bata in #365
  • Update TrialList component by @c-bata in #364
  • Support user attributes on GraphSlice by @c-bata in #366
  • Remove TODOs in CachedExtraStudyProperty by @c-bata in #367
  • Set key attributes in TrialList by @c-bata in #368
  • Avoid to calculate importance when only available single trial by @c-bata in #369
  • Add trial tell feature by @keisuke-umezawa in #355
  • Introduce Artifact by @c-bata in #314
  • Introducing Custom User Widget by @c-bata in #370
  • Save reload interval on localStorage by @c-bata in #372
  • Bump the version up to v0.9.0b3 by @c-bata in #373
  • Fix bug of custom user widgets and enhance artifact support. by @c-bata in #375
  • Update best trials when state is updated by @c-bata in #376
  • Bump the version up to v0.9.0b4 by @c-bata in #377
  • Fix artifact import issue by @c-bata in #381
  • Bump the version up to v0.9.0b5 by @c-bata in #382
  • Display objective forms even for completed trials by @c-bata in #387
  • Remove redundant json dumps by @c-bata in #390
  • Sort studies by study_id by @c-bata in #391
  • Fix bug of setStateValues by @c-bata in #392
  • Add an initial Audio support by @c-bata in #395
  • Keep backward compatibility of widget definition by @c-bata in #393
  • Introduce --storage-class CLi argument to support journal storage by @c-bata in #394
  • Bump the version up to v0.9.0b6 by @c-bata in #396
  • Add Sphinx documentation by @c-bata in #399
  • Render an empty graph at plot_contour() when the length of trials less than two. by @c-bata in #402
  • Change yAxis on history plot when user attribute is selected by @c-bata in #403
  • Update release procedure in CONTRIBUTING.md by @keisuke-umezawa in #408
  • Simplify the logic of selecting trials in TrialList by @keisuke-umezawa in #405
  • Handle RuntimeError while calculating importance by @c-bata in #409
  • Separate tell api into complete api and fail api by @keisuke-umezawa in #407
  • Fix getDominatedTrials by @knshnb in #413
  • Minor improvements on human-in-the-loop UI by @c-bata in #414
  • Bump the version up to v0.9.0 by @c-bata in #415

New Contributors

Full Changelog: v0.8.1...v0.9.0

v0.9.0b6

10 Feb 02:33
6b499c3
Compare
Choose a tag to compare
v0.9.0b6 Pre-release
Pre-release

What's Changed

  • Display objective forms even for completed trials by @c-bata in #387
  • Remove redundant json dumps by @c-bata in #390
  • Sort studies by study_id by @c-bata in #391
  • Fix bug of setStateValues by @c-bata in #392
  • Add an initial Audio support by @c-bata in #395
  • Keep backward compatibility of widget definition by @c-bata in #393
  • Introduce --storage-class CLi argument to support journal storage by @c-bata in #394
  • Bump the version up to v0.9.0b6 by @c-bata in #396

Full Changelog: v0.9.0b5...v0.9.0b6

v0.9.0b5

01 Feb 00:55
272f826
Compare
Choose a tag to compare
v0.9.0b5 Pre-release
Pre-release

What's Changed

Full Changelog: v0.9.0b4...v0.9.0b5

v0.9.0b4

27 Jan 10:04
79fd0b7
Compare
Choose a tag to compare
v0.9.0b4 Pre-release
Pre-release

Human-in-the-loop Optimization

human-in-the-loop

$ pip install Pillow optuna==3.1.0 optuna-dashboard==0.9.0b4
from __future__ import annotations

import os
import textwrap
import threading
import time
from typing import NoReturn
from wsgiref.simple_server import make_server

import optuna
from PIL import Image
from optuna.trial import TrialState

from optuna_dashboard import ObjectiveChoiceWidget, save_note, ObjectiveSliderWidget
from optuna_dashboard import register_objective_form_widgets
from optuna_dashboard import set_objective_names
from optuna_dashboard import wsgi
from optuna_dashboard.artifact import upload_artifact
from optuna_dashboard.artifact.file_system import FileSystemBackend


storage = optuna.storages.InMemoryStorage()
base_path = os.path.join(os.path.dirname(__file__), "artifact")
artifact_backend = FileSystemBackend(base_path=base_path)


def suggest_and_generate_image(study: optuna.Study) -> None:
    # Ask new parameters
    trial = study.ask()
    r = trial.suggest_int("r", 0, 255)
    g = trial.suggest_int("g", 0, 255)
    b = trial.suggest_int("b", 0, 255)

    # Generate image
    image_path = f"tmp/sample-{trial.number}.png"
    image = Image.new("RGB", (320, 240), color=(r,g,b))
    image.save(image_path)

    # Upload Artifact
    artifact_id = upload_artifact(artifact_backend, trial, image_path)

    # Save Note
    note = textwrap.dedent(f'''\
    ## Trial {trial.number}
    
    ![generated-image](/artifacts/{study._study_id}/{trial._trial_id}/{artifact_id})
    ''')
    save_note(trial, note)


def start_preferential_optimization() -> NoReturn:
    # Create Study
    study = optuna.create_study(
        study_name="Human-in-the-loop Optimization",
        storage=storage,
        directions=["minimize", "maximize"]
    )
    set_objective_names(study, ["Human Perception Score", "Looks Yellow?"])
    register_objective_form_widgets(study, widgets=[
        ObjectiveChoiceWidget(
            choices=["Good 👍", "Bad 👎"],
            values=[-1, 1],
            description="Please input your score!",
        ),
        ObjectiveSliderWidget(
            min=1,
            max=10,
            step=1,
            description="Higher is better.",
        ),
    ])

    # Start Human-in-the-loop Optimization
    n_batch = 3
    while True:
        running_trials = study.get_trials(deepcopy=False, states=(TrialState.RUNNING,))
        if len(running_trials) >= n_batch:
            time.sleep(5)
            continue
        suggest_and_generate_image(study)


def main() -> None:
    if not os.path.exists(base_path):
        os.mkdir(base_path)

    # Start Dashboard server on background
    app = wsgi(storage, artifact_backend=artifact_backend)
    httpd = make_server("127.0.0.1", 8080, app)
    thread = threading.Thread(target=httpd.serve_forever)
    thread.start()

    # Run optimize loop
    try:
        start_preferential_optimization()
    except KeyboardInterrupt:
        httpd.shutdown()
        httpd.server_close()
        thread.join()


if __name__ == "__main__":
    main()

What's Changed

  • Fix bug of custom user widgets and enhance artifact support. by @c-bata in #375
  • Update best trials when state is updated by @c-bata in #376
  • Bump the version up to v0.9.0b4 by @c-bata in #377

Full Changelog: v0.9.0b3...v0.9.0b4