mythos.ui.loggers.jupyter
Implements a plotly logger for use in Jupyter notebooks.
Attributes
Classes
A logger for use in Jupyter notebooks that uses plotly. |
|
A logger for use in Jupyter notebooks. |
Functions
|
Calculate the number of rows and columns for the plot. |
|
Setup the layout of the plotly figure. |
Module Contents
- mythos.ui.loggers.jupyter.LBL_TOP_HEADER = 'Optimization Status'
- mythos.ui.loggers.jupyter.LBL_PROG_BAR = 'Optimizing'
- mythos.ui.loggers.jupyter.LBL_SIM_HEADER = 'Simulators'
- mythos.ui.loggers.jupyter.LBL_OBS_HEADER = 'Observables'
- mythos.ui.loggers.jupyter.LBL_OBJ_HEADER = 'Objectives'
- mythos.ui.loggers.jupyter.WARN_INVALID_NCOLS_NROWS = 'The number of rows and columns is less than the number of plots. Adjusting the number of rows...
- mythos.ui.loggers.jupyter.figure_widget_f
- mythos.ui.loggers.jupyter.scatter_f
- mythos.ui.loggers.jupyter.make_subplots_f
- mythos.ui.loggers.jupyter.calc_rows_and_columns(n_plots: int, nrows: int | None, ncols: int | None) tuple[int, int][source]
Calculate the number of rows and columns for the plot.
- mythos.ui.loggers.jupyter.setup_figure_layout(fig: plotly.graph_objects.FigureWidget, nrows: int, ncols: int, trace_names: list[str | list[str]]) None[source]
Setup the layout of the plotly figure.
- Parameters:
fig – the plotly figure
nrows – the number of rows in the plot
ncols – the number of columns in the plot
trace_names – the names of the traces
- class mythos.ui.loggers.jupyter.PlotlyLogger(observable_plots: list[str | list[str]], nrows: int | None, ncols: int | None, width_px: int | None = None, height_px: int | None = None)[source]
Bases:
mythos.ui.loggers.logger.LoggerA logger for use in Jupyter notebooks that uses plotly.
- fig
- observable_plots
- update_status(name: str, status: mythos.ui.loggers.logger.Status) None[source]
Null operation.
- class mythos.ui.loggers.jupyter.JupyterLogger(simulators: list[str], observables: list[str], objectives: list[str], metrics_to_log: list[list[str] | str], max_opt_steps: int, plots_size_px: tuple[int, int] | None = None, plots_nrows_ncols: tuple[int, int] | None = None)[source]
Bases:
mythos.ui.loggers.logger.LoggerA logger for use in Jupyter notebooks.
- prog_bar
- sim_btns
- obs_btns
- obj_btns
- btn_map
- plots
- percent_complete
- dashboard
- update_status(name: str, kind: mythos.ui.loggers.logger.StatusKind, status: mythos.ui.loggers.logger.Status) None[source]
Updates the status of a simulator, objective, or observable.