diff --git a/src/single-core-regen/util/optuna_vis.py b/src/single-core-regen/util/optuna_vis.py new file mode 100644 index 0000000..106dbb4 --- /dev/null +++ b/src/single-core-regen/util/optuna_vis.py @@ -0,0 +1,18 @@ +from dash import Dash, dcc, html +import logging +import dash_bootstrap_components as dbc + + +def show_figures(*figures): + for figure in figures: + figure.layout.template = 'plotly_dark' + + app = Dash(external_stylesheets=[dbc.themes.DARKLY]) + app.layout = html.Div([ + dcc.Graph(figure=figure) for figure in figures + ]) + log = logging.getLogger('werkzeug') + log.setLevel(logging.ERROR) + + app.show = lambda *args, **kwargs: app.run_server(*args, **kwargs, debug=False) + return app \ No newline at end of file