Skip to content

lmsys script crashes with polars SchemaError during assemble_frame() #4

@timClicks

Description

@timClicks

On a fresh clone of the repo at 0af9132, I'm encountering an issue with the lmsys script when Polars attempts to combine all of the data together into a single dataframe.

$ python --version
Python 3.12.3

$ lmsys
2025-01-27 12:26:20.374 | INFO     | evals.benchmarks.lmsys:download_date:64 - Downloading elo_results_20230717.pkl
...
Traceback (most recent call last):
  File "/home/tim/Stencila/evals/.venv/bin/lmsys", line 8, in <module>
    sys.exit(lmsys.all())
             ^^^^^^^^^^^
  File "/home/tim/Stencila/evals/src/evals/benchmarks/lmsys.py", line 242, in all
    assemble()
  File "/home/tim/Stencila/evals/src/evals/benchmarks/lmsys.py", line 236, in assemble
    df = assemble_frame()
         ^^^^^^^^^^^^^^^^
  File "/home/tim/Stencila/evals/src/evals/benchmarks/lmsys.py", line 229, in assemble_frame
    df = pl.concat(
         ^^^^^^^^^^
  File "/home/tim/Stencila/evals/.venv/lib/python3.12/site-packages/polars/functions/eager.py", line 185, in concat
    out = wrap_df(plr.concat_df(elems))
                  ^^^^^^^^^^^^^^^^^^^^
polars.exceptions.SchemaError: type Float64 is incompatible with expected type Int64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions