Skip to content

radar_plot fails on pandas 3 (data.loc with 1-tuple key) #854

Open

Description

@davrens101

evaluate.visualization.radar_plot raises on pandas 3.x:

from evaluate.visualization import radar_plot
data = [{"accuracy": 0.99, "latency_in_seconds": 0.5}, {"accuracy": 0.98, "latency_in_seconds": 1.2}]
radar_plot(data, ["model1", "model2"], ["latency_in_seconds"])
ValueError: zip() argument 2 is longer than argument 1

(pandas 3.0.6; tests/test_viz.py::TestViz::test_output_is_plot fails the same way.)

Cause: the loop is for g in zip(data.index), so g is a 1-tuple ("model1",). data.loc[("model1",)] is interpreted by pandas 3 as a multi-axis key. The legend label also becomes the tuple. Iterating data.index directly fixes both. I have a one-line patch ready.

Activity

  1. davrens101 commented on Nov 12, 2026

    @davrens101
    Author

    Claiming this issue; fix is in PR #855 (davrens101 fork, non-force push to PR head branch). Change is tested locally; AI-assisted, disclosed in PR body.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions