Skip to content

comet_ml.UI

UI(column=None)

Main UI for Comet's python panel widgets.

The ui class is a Python class that is only available when comet_ml is used within the context of Python Code Panels and can be used to add interactivity to the panels.

ui contains three sets of functions:

To use comet_ml.ui, you simply need to import it, e.g.:

from comet_ml import ui

choice = ui.dropdown("Choose one:", ["A", "B", "C"])
ui.display("You picked", choice)

Display functions

Main UI for Comet's python panel widgets.

display

display(*args, format=None, **kwargs)

This method will be deprecated in a future version in favor of using streamlit widgets.

display_figure

display_figure(plt)

This method will be deprecated in a future version in favor of using streamlit widgets.

display_image

display_image(data, format=None, width=None)

This method will be deprecated in a future version in favor of using streamlit widgets.

display_markdown

display_markdown(*args)

This method will be deprecated in a future version in favor of using streamlit widgets.

display_plotly_figure

display_plotly_figure(figure)

This method will be deprecated in a future version in favor of using streamlit widgets.

display_text

display_text(*lines)

This method will be deprecated in a future version in favor of using streamlit widgets.

Widget functions

Main UI for Comet's python panel widgets.

session_state property

session_state

Return the underlying session state.

button

button(label, key=None, on_click=None, args=None, kwargs=None, classes=None)

This method will be deprecated in a future version in favor of using streamlit widgets.

checkbox

checkbox(
    label,
    value=False,
    key=None,
    on_click=None,
    args=None,
    kwargs=None,
    classes=None,
)

This method will be deprecated in a future version in favor of using streamlit widgets.

columns

columns(items, classes=None, **styles)

This method will be deprecated in a future version in favor of using streamlit widgets.

dropdown

dropdown(
    label,
    options,
    index=0,
    format_func=str,
    key=None,
    on_change=None,
    args=None,
    kwargs=None,
    multiple=False,
    classes=None,
)

This method will be deprecated in a future version in favor of using streamlit widgets.

input

input(
    label,
    value="",
    key=None,
    on_click=None,
    args=None,
    kwargs=None,
    classes=None,
)

This method will be deprecated in a future version in favor of using streamlit widgets.

progress

progress(label, percent, on_load=None, args=None, kwargs=None, classes=None)

This method has been deprecated.

Utility functions

Main UI for Comet's python panel widgets.

add_css

add_css(css)

This method has been deprecated.

set_css

set_css(css)

This method has been deprecated.

Dec. 17, 2024