Skip to content

Conversation

@juanmleng
Copy link
Contributor

@juanmleng juanmleng commented Jan 29, 2026

Pull Request Description

What and why?

What

Set plotly to >=6.0.0.

Why

plotly.js v2 does not fully support figures generated by plotly 6.x.x, causing valid figures to fail rendering in the UI.
Upgrading to plotly.js v3.0.0 restores compatibility, fixes the rendering issue, and allows us to continue upgrading plotly in the vm-library without capping its version.

How to test

To reproduce the issue:

  • In the validmind library, set plotly to 6.x.x.
  • In the frontend, set plotly.js to 2.x.x
  • Run the following validmind test:
import numpy as np
import pandas as pd
import plotly.express as px

np.random.seed(0)
dates = pd.date_range(start="2025-01-01", periods=30, freq="D")
values = np.cumsum(np.random.randn(len(dates))) 
df = pd.DataFrame({"date": dates, "value": values})

@vm.test("my_custom_tests.RandomWalk")
def random_walk(dataset):
    df = dataset._df
    fig_px = px.line(
        df,
        x="date",
        y="value",
        title="Simple Line Plot — Simulated Data (plotly.express)",
        labels={"date": "Date", "value": "Value"}
    )
    fig_px.update_layout(template="plotly_white")
    return fig_px

vm_dataset = vm.init_dataset(
    dataset=df,
    input_id="dataset",
)

from validmind.tests import run_test

result = run_test(
    "my_custom_tests.RandomWalk",
    inputs={"dataset": vm_dataset},
).log()
  • Go to the UI, and you should see something like this:
Screenshot 2026-01-29 at 13 27 04

To test the fix:

  • In the validmind library, set plotly to 6.x.x.
  • In the frontend, set plotly.js to 3.x.x
  • Run the validmind test above
  • Go to the UI, and you should see something like this:
Screenshot 2026-01-29 at 13 20 14

What needs special review?

Dependencies, breaking changes, and deployment notes

https://github.com/validmind/frontend/pull/2162

Release notes

Checklist

  • What and why
  • Screenshots or videos (Frontend)
  • How to test
  • What needs special review
  • Dependencies, breaking changes, and deployment notes
  • Labels applied
  • PR linked to Shortcut
  • Unit tests added (Backend)
  • Tested locally
  • Documentation updated (if required)
  • Environment variable additions/changes documented (if required)

@juanmleng juanmleng self-assigned this Jan 29, 2026
@juanmleng juanmleng added bug Something isn't working internal Not to be externalized in the release notes labels Jan 29, 2026
Copy link
Contributor

@cachafla cachafla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

@github-actions
Copy link
Contributor

PR Summary

This pull request introduces several dependency updates and a project version bump. The main functional changes include:

  1. A new dependency on the library "narwhals" (version 2.15.0) has been added. This package provides a lightweight compatibility layer between dataframe libraries. It comes with additional optional extras allowing integration with packages such as cudf, dask, duckdb, ibis, modin, pandas, polars, pyarrow, pyspark, pyspark-connect, and sqlframe.

  2. The dependency for "plotly" has been upgraded from version 5.24.1 to 6.5.2. This update includes changes in the package metadata (e.g., description and file hashes) and broader version requirements in the project configuration. The dependency constraint in the project configuration (pyproject.toml) has also been updated accordingly, ensuring that the project now accepts any plotly release from version 6.0.0 and above.

  3. The project version has been bumped from 2.11.2 to 2.11.3, and the version in the source file has been updated to reflect this.

These changes primarily focus on keeping dependencies up to date and adding new functionality via the narwhals package, which may impact dataframe compatibility setups across the codebase.

Test Suggestions

  • Verify that the validmind project functions correctly with the new narwhals dependency by running the full test suite.
  • Test plotly charts and visualizations to ensure they behave as expected after the upgrade.
  • Run dependency compatibility tests to ensure that the additional extras for narwhals integrate well with supported packages.
  • Perform integration tests for any features that rely on both plotly and narwhals to catch any conflicts or regressions.

@juanmleng juanmleng merged commit cfe1b27 into main Jan 30, 2026
17 checks passed
@juanmleng juanmleng deleted the juan/sc-14222/incorrect-plotly-figures-displayed branch January 30, 2026 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working internal Not to be externalized in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants