Join the Kedro community

Home
Members
Philippe Martin
P
Philippe Martin
Offline, last seen 4 weeks ago
Joined January 22, 2025

Hello all ! I'm trying to incorporate plotly visualizations in my mlflow. I've created a simple function:

def make_plotly():
    import plotly.express as px
    df = px.data.iris()
    fig = px.scatter(df, x="sepal_width", y="sepal_length", color="species",
                    size='petal_length', hover_data=['petal_width'])
    fig.show()
    return fig 
And created a pipeline where the output of the associated node is stored in the catalog
plotly_fig:
  type: kedro_mlflow.io.artifacts.MlflowArtifactDataset
  dataset:
    type: plotly.PlotlyDataset
    filepath: data/08_reporting/plotly.json
    plotly_args:
      type: scatter

After running the pipeline, the fig properly shows up in a tab, then is stored in a json format. However, in mlflow ui, it only appears as the json file (see attached image).

  • Is there a way to show the plotly fig in mlflow ? Do I miss something ?
  • Also, what args would you recommend to save and load the plotly fig ?

7 comments
P
H
G
R