pola-rs / polars

Dataframes powered by a multithreaded, vectorized query engine, written in Rust
https://docs.pola.rs
Other
29.98k stars 1.93k forks source link

Broadcasting issue #18896

Open douglas-raillard-arm opened 1 month ago

douglas-raillard-arm commented 1 month ago

Re-opening https://github.com/pola-rs/polars/issues/18719 as it is still failing in v1.8.1

Checks

Reproducible example

Same reproducer as on https://github.com/pola-rs/polars/issues/18719 but re-ran with 1.8.1:

import io

import polars as pl

plan = r'''{"IR":{"version":1623,"dsl":{"MapFunction":{"input":{"HStack":{"input":{"IR":{"version":1546,"dsl":{"HStack":{"input":{"MapFunction":{"input":{"Select":{"expr":[{"Column":"__timestamp"},{"Function":{"input":[{"Function":{"input":[{"Column":"line"},{"Literal":"Null"}],"function":{"StringExpr":"StripChars"},"options":{"collect_groups":"ElementWise","fmt_str":"","check_lengths":true,"flags":"ALLOW_GROUP_AWARE"}}}],"function":{"StringExpr":{"ExtractGroups":{"dtype":{"Struct":[{"name":"data","dtype":"String"},{"name":"event","dtype":"String"}]},"pat":"(?:[\\w@]+):? *(?:data=(?P<data>.+?)(?: +|$)|event=(?P<event>.+?)(?: +|$)|\\w+=\\S+?(?: +|$))+"}}},"options":{"collect_groups":"ElementWise","fmt_str":"","check_lengths":true,"flags":"ALLOW_GROUP_AWARE"}}}],"input":{"Filter":{"input":{"MapFunction":{"input":{"Select":{"expr":[{"Column":"__event"},{"Column":"__fields"},{"Column":"__timestamp"},{"Column":"line"}],"input":{"IR":{"version":1464,"dsl":{"HStack":{"input":{"Select":{"expr":[{"Column":"__timestamp"},{"Column":"__event"},{"Column":"__fields"},{"Column":"line"}],"input":{"HStack":{"input":{"DataFrameScan":{"df":{"columns":[{"name":"__event","datatype":"Binary","bit_settings":"","values":[[114,116,97,112,112,95,109,97,105,110],[114,116,97,112,112,95,109,97,105,110],[114,116,97,112,112,95,109,97,105,110]]},{"name":"__fields","datatype":"Binary","bit_settings":"","values":[[101,118,101,110,116,61,115,116,97,114,116],[101,118,101,110,116,61,99,108,111,99,107,95,114,101,102,32,100,97,116,97,61,52,55,49,51,50,52,56,54,48],[101,118,101,110,116,61,101,110,100]]},{"name":"__timestamp","datatype":"Int64","bit_settings":"","values":[471410977940,471412970020,472920141960]},{"name":"line","datatype":"Binary","bit_settings":"","values":[[114,116,97,112,112,95,109,97,105,110,58,32,101,118,101,110,116,61,115,116,97,114,116,10],[114,116,97,112,112,95,109,97,105,110,58,32,101,118,101,110,116,61,99,108,111,99,107,95,114,101,102,32,100,97,116,97,61,52,55,49,51,50,52,56,54,48,10],[114,116,97,112,112,95,109,97,105,110,58,32,101,118,101,110,116,61,101,110,100,10]]}]},"schema":{"fields":{"__event":"Binary","__fields":"Binary","__timestamp":"Int64","line":"Binary"}}}},"exprs":[{"Cast":{"expr":{"DtypeColumn":["Binary"]},"dtype":"String","options":"Strict"}}],"options":{"run_parallel":true,"duplicate_check":true,"should_broadcast":true}}},"options":{"run_parallel":true,"duplicate_check":true,"should_broadcast":true}}},"exprs":[{"Cast":{"expr":{"Column":"__event"},"dtype":{"Categorical":[null,"Physical"]},"options":"Strict"}}],"options":{"run_parallel":true,"duplicate_check":true,"should_broadcast":true}}}}},"options":{"run_parallel":true,"duplicate_check":true,"should_broadcast":true}}},"function":{"Drop":{"to_drop":[{"Root":{"Column":"__fields"}}],"strict":false}}}},"predicate":{"BinaryExpr":{"left":{"Column":"__event"},"op":"Eq","right":{"Literal":{"String":"rtapp_main"}}}}}},"options":{"run_parallel":true,"duplicate_check":true,"should_broadcast":true}}},"function":{"Unnest":[{"Root":{"Column":"line"}}]}}},"exprs":[{"Function":{"input":[{"DtypeColumn":["String"]},{"Literal":"Null"}],"function":{"StringExpr":"StripChars"},"options":{"collect_groups":"ElementWise","fmt_str":"","check_lengths":true,"flags":"ALLOW_GROUP_AWARE"}}}],"options":{"run_parallel":true,"duplicate_check":true,"should_broadcast":true}}}}},"exprs":[{"Cast":{"expr":{"Column":"__timestamp"},"dtype":"Int64","options":"Strict"}},{"Cast":{"expr":{"Column":"data"},"dtype":{"Categorical":[null,"Physical"]},"options":"Strict"}},{"Cast":{"expr":{"Column":"event"},"dtype":{"Categorical":[null,"Physical"]},"options":"Strict"}}],"options":{"run_parallel":true,"duplicate_check":true,"should_broadcast":true}}},"function":{"Rename":{"existing":["__timestamp"],"new":["Time"]}}}}}}'''
plan = io.StringIO(plan)
df = pl.LazyFrame.deserialize(plan, format='json')
print(df.explain(optimized=True))
print(df.collect())

Log output

File "/home/docs/checkouts/readthedocs.org/user_builds/lisa-linux-integrated-system-analysis/checkouts/test-rtd/lisa/trace.py", line 1940, in parse_event
    df = df.collect()
         ^^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/lisa-linux-integrated-system-analysis/envs/test-rtd/lib/python3.11/site-packages/polars/lazyframe/frame.py", line 2033, in collect
    return wrap_df(ldf.collect(callback))
                   ^^^^^^^^^^^^^^^^^^^^^
polars.exceptions.InvalidOperationError: Series: line, length 1 doesn't match the DataFrame height of 3

If you want this Series to be broadcasted, ensure it is a scalar (for instance by adding '.first()').

Exception occurred:
  File "/home/docs/checkouts/readthedocs.org/user_builds/lisa-linux-integrated-system-analysis/envs/test-rtd/lib/python3.11/site-packages/polars/lazyframe/frame.py", line 2033, in collect
    return wrap_df(ldf.collect(callback))
                   ^^^^^^^^^^^^^^^^^^^^^
polars.exceptions.InvalidOperationError: Series: line, length 1 doesn't match the DataFrame height of 3

Issue description

Collecting that LazyFrame triggers an exception in readthedocs CI but not locally, even after re-creating the same environment (pip freeze). The only material difference I can think of is some StringCache() state that is difference for whatever reason.

Note that this issue only started occuring from polars 1.7.0. Before that, the code was working.

Also note that the JSON plan is only there to make reproduction of the issue easier (both for me to extract the data from the CI log and for that bug report). The issue originally happened without that JSON layer (at least not at this spot). I also ended up trying the reported reproducer verbatim both in the CI and locally, with the same result (fails in the CI, succeeds locally).

Expected behavior

This should work or not work, but consistently everywhere. Most likely work.

Installed versions

Polars upgraded to 1.8.1 compared to initial report.

ritchie46 commented 1 month ago

Can you show the query? You might need to add first().

douglas-raillard-arm commented 1 month ago

The query is not trivial as it involves multiple functions but the dumped JSON for v1.7.0 is:

import io

import polars as pl

plan = r'''{"IR":{"version":1428,"dsl":{"MapFunction":{"input":{"HStack":{"input":{"IR":{"version":1351,"dsl":{"HStack":{"input":{"MapFunction":{"input":{"Select":{"expr":[{"Column":"__timestamp"},{"Function":{"input":[{"Function":{"input":[{"Column":"line"},{"Literal":"Null"}],"function":{"StringExpr":"StripChars"},"options":{"collect_groups":"ElementWise","fmt_str":"","check_lengths":true,"flags":"ALLOW_GROUP_AWARE"}}}],"function":{"StringExpr":{"ExtractGroups":{"dtype":{"Struct":[{"name":"data","dtype":"String"},{"name":"event","dtype":"String"}]},"pat":"(?:[\\w@]+):? *(?:data=(?P<data>.+?)(?: +|$)|event=(?P<event>.+?)(?: +|$)|\\w+=\\S+?(?: +|$))+"}}},"options":{"collect_groups":"ElementWise","fmt_str":"","check_lengths":true,"flags":"ALLOW_GROUP_AWARE"}}}],"input":{"Filter":{"input":{"MapFunction":{"input":{"Select":{"expr":[{"Column":"__event"},{"Column":"__fields"},{"Column":"__timestamp"},{"Column":"line"}],"input":{"IR":{"version":1269,"dsl":{"HStack":{"input":{"Select":{"expr":[{"Column":"__timestamp"},{"Column":"__event"},{"Column":"__fields"},{"Column":"line"}],"input":{"HStack":{"input":{"DataFrameScan":{"df":{"columns":[{"name":"__event","datatype":"Binary","bit_settings":"","values":[[114,116,97,112,112,95,109,97,105,110],[114,116,97,112,112,95,109,97,105,110],[114,116,97,112,112,95,109,97,105,110]]},{"name":"__fields","datatype":"Binary","bit_settings":"","values":[[101,118,101,110,116,61,115,116,97,114,116],[101,118,101,110,116,61,99,108,111,99,107,95,114,101,102,32,100,97,116,97,61,52,55,49,51,50,52,56,54,48],[101,118,101,110,116,61,101,110,100]]},{"name":"__timestamp","datatype":"Int64","bit_settings":"","values":[471410977940,471412970020,472920141960]},{"name":"line","datatype":"Binary","bit_settings":"","values":[[114,116,97,112,112,95,109,97,105,110,58,32,101,118,101,110,116,61,115,116,97,114,116,10],[114,116,97,112,112,95,109,97,105,110,58,32,101,118,101,110,116,61,99,108,111,99,107,95,114,101,102,32,100,97,116,97,61,52,55,49,51,50,52,56,54,48,10],[114,116,97,112,112,95,109,97,105,110,58,32,101,118,101,110,116,61,101,110,100,10]]}]},"schema":{"fields":{"__event":"Binary","__fields":"Binary","__timestamp":"Int64","line":"Binary"}},"output_schema":null,"filter":null}},"exprs":[{"Cast":{"expr":{"DtypeColumn":["Binary"]},"dtype":"String","options":"Strict"}}],"options":{"run_parallel":true,"duplicate_check":true,"should_broadcast":true}}},"options":{"run_parallel":true,"duplicate_check":true,"should_broadcast":true}}},"exprs":[{"Cast":{"expr":{"Column":"__event"},"dtype":{"Categorical":[null,"Physical"]},"options":"Strict"}}],"options":{"run_parallel":true,"duplicate_check":true,"should_broadcast":true}}}}},"options":{"run_parallel":true,"duplicate_check":true,"should_broadcast":true}}},"function":{"Drop":{"to_drop":[{"Root":{"Column":"__fields"}}],"strict":false}}}},"predicate":{"BinaryExpr":{"left":{"Column":"__event"},"op":"Eq","right":{"Literal":{"String":"rtapp_main"}}}}}},"options":{"run_parallel":true,"duplicate_check":true,"should_broadcast":true}}},"function":{"Unnest":[{"Root":{"Column":"line"}}]}}},"exprs":[{"Function":{"input":[{"DtypeColumn":["String"]},{"Literal":"Null"}],"function":{"StringExpr":"StripChars"},"options":{"collect_groups":"ElementWise","fmt_str":"","check_lengths":true,"flags":"ALLOW_GROUP_AWARE"}}}],"options":{"run_parallel":true,"duplicate_check":true,"should_broadcast":true}}}}},"exprs":[{"Cast":{"expr":{"Column":"__timestamp"},"dtype":"Int64","options":"Strict"}},{"Cast":{"expr":{"Column":"data"},"dtype":{"Categorical":[null,"Physical"]},"options":"Strict"}},{"Cast":{"expr":{"Column":"event"},"dtype":{"Categorical":[null,"Physical"]},"options":"Strict"}}],"options":{"run_parallel":true,"duplicate_check":true,"should_broadcast":true}}},"function":{"Rename":{"existing":["__timestamp"],"new":["Time"]}}}}}}'''
plan = io.StringIO(plan)
df = pl.LazyFrame.deserialize(plan, format='json')
print(df)
print(df.collect())

The code leading to this lazyframe is either:

EDIT: the LazyFrame pretty printed is:

RENAME
   WITH_COLUMNS:
   [col("data").strict_cast(Categorical(None, Physical)), col("event").strict_cast(Categorical(None, Physical))] 
     WITH_COLUMNS:
     [col("data").str.strip_chars([null]), col("event").str.strip_chars([null]), col("__timestamp").strict_cast(Int64)] 
      UNNEST by:[line]
         SELECT [col("__timestamp"), col("line").str.strip_chars([null]).str.extract_groups()] FROM
          simple π 3/3 ["__event", "__timestamp", ... 1 other column]
            FILTER [(col("__event")) == (String(rtapp_main))] FROM
               WITH_COLUMNS:
               [col("__event").strict_cast(Categorical(None, Physical))] 
                simple π 3/3 ["__timestamp", "__event", ... 1 other column]
                   WITH_COLUMNS:
                   [col("__event").strict_cast(String), col("line").strict_cast(String)] 
                    DF ["__event", "__fields", "__timestamp", "line"]; PROJECT 3/4 COLUMNS; SELECTION: None

EDIT 2: I'm rebuilding to get an up-to-date JSON for v1.8. EDIT 3: the JSON IR is now refreshed and I updated the issue description to include it, rather than just pointing at the old one in the old issue.

douglas-raillard-arm commented 1 month ago

Part of the problem here is that the error happens very late when collecting, at which point location information is completely lost. Is there a way to make polars validate at every step as some kind of debug mode ?

EDIT: the other part of the problem is that the issue is not reproducible locally, but happens 100% of the time when building our documentation in the readthedocs.org runner.

ritchie46 commented 1 month ago

Can you serialize the result before running? As I cannot reproduce this locally. If I can reproduce I know what it can be. This query plan formatted doesn't seem to have any scalar misuse.

That's where the error comes from. It checks at runtime if the literal is allowed to be broadcasted. This is only allowed if the literal is a scalar.

douglas-raillard-arm commented 1 month ago

Can you serialize the result before running?

If you mean serialize to JSON before calling .collect(), this is what is in the reproducer of the current ticket (I updated it 45min ago). What is puzzling is that even with that JSON I also cannot reproduce locally. It only ever happened on readthedocs for whatever reason ...

ritchie46 commented 1 month ago

Could you compile from source with #18904?

That will try to print the expression that is at fault.

douglas-raillard-arm commented 1 month ago

I'll give it a go but this will probably take a while. Are the compiled binaries statically linked and fully portable ? I have no idea what libc is used on that runner, and compiling in-situ is impossible because of build timeouts.

ritchie46 commented 1 month ago

Ok, will patch tonight with an option to temporarily silence this error. Note that it will become a hard error in the future, but hopefully with the new better error message we can find the culprit.

ritchie46 commented 1 month ago

You can then silence it by setting POLARS_ALLOW_NON_SCALAR_EXP="1". But first watch the improved error message for the expression. ;)

douglas-raillard-arm commented 1 month ago

I tried to build a wheel and commit it to a branch to try it out:

# build the wheel with a reasonable size
maturin build -m py-polars/Cargo.toml --strip

The DSO shipping in the .whl file seems to only depend on glibc, but I haven't tried to check what runs in the CI runner.

>>> ldd target/wheels/polars.abi3.so
        linux-vdso.so.1 (0x00007fffa7195000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x0000760bfb071000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x0000760bea000000)
        /lib64/ld-linux-x86-64.so.2 (0x0000760bfb0bb000)

And then it failed to install in the readthedocs runner for some unknown reason:

ERROR: polars-1.8.1-cp38-abi3-manylinux_2_39_x86_64.whl is not a supported wheel on this platform.
douglas-raillard-arm commented 1 month ago

So I just re-ran the job, which installed 1.8.2 and the error stays:

polars.exceptions.InvalidOperationError: Series: line, length 1 doesn't match the DataFrame height of 3
If you want this Series to be broadcasted, ensure it is a scalar (for instance by adding '.first()').

https://readthedocs.org/api/v2/build/25738204.txt

I tried with POLARS_ALLOW_NON_SCALAR_EXP=1 just before collect():

        import os
        os.environ['POLARS_ALLOW_NON_SCALAR_EXP'] = '1'
        df = df.collect()

And still get the same error: https://readthedocs.org/api/v2/build/25738487.txt

So this makes me wonder if either the error is coming from another place, or v1.8.2 does not have this code in it somehow. Pip does install 1.8.2 and nothing else according to the log.

EDIT: this makes me realize that setting os.environ is probably useless as polars will use the Rust code, which is probably looking at the environment vector (directly or via libc). Modifying os.environ does not modify that, it only lives in the Python interpreted world.

EDIT 2: I used RTD facility to set an env var for the whole runner before any code runs, and still get the same error ...

ritchie46 commented 1 month ago

Can you set POLARS_PANIC_ON_ERR=1 and RUST_BACKTRACE=1? This will give us the full stacktrace. That way we can see where it occurs.

DIT: this makes me realize that setting os.environ is probably useless as polars will use the Rust code, which is probably looking at the environment vector (directly or via libc). Modifying os.environ does not modify that, it only lives in the Python interpreted world.

You must set it before Polars is imported.

douglas-raillard-arm commented 1 month ago

Here we go:

``` thread '' panicked at /home/runner/work/polars/polars/crates/polars-error/src/lib.rs:45:37: sink_Parquet(ParquetWriteOptions { compression: Lz4Raw, statistics: StatisticsOptions { min_value: true, max_value: true, distinct_count: false, null_count: true }, row_group_size: None, data_page_size: None, maintain_order: true }) not yet supported in standard engine. Use 'collect().write_parquet()' stack backtrace: 0: rust_begin_unwind 1: core::panicking::panic_fmt 2: >::from::panic_cold_display 3: >::from 4: polars_mem_engine::planner::lp::create_physical_plan_impl 5: polars_lazy::frame::LazyFrame::prepare_collect 6: polars_lazy::frame::LazyFrame::sink 7: polars_python::lazyframe::general::::sink_parquet 8: polars_python::lazyframe::general::::__pymethod_sink_parquet__ 9: pyo3::impl_::trampoline::trampoline 10: polars_python::lazyframe::general::_::__INVENTORY::trampoline 11: method_vectorcall_VARARGS_KEYWORDS at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/descrobject.c:364:14 12: _PyObject_VectorcallTstate at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11 13: PyObject_Vectorcall at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:299:12 14: _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:4769:23 15: _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 16: _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 17: _PyVectorcall_Call at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:257:24 18: _PyObject_Call at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:328:16 19: do_call_core at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12 20: _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22 21: _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 22: _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 23: _PyObject_VectorcallTstate at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11 24: method_vectorcall at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:59:18 25: _PyVectorcall_Call at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:257:24 26: _PyObject_Call at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:328:16 27: do_call_core at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12 28: _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22 29: _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 30: _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 31: _PyVectorcall_Call at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:257:24 32: _PyObject_Call at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:328:16 33: do_call_core at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12 34: _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22 35: _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 36: _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 37: _PyVectorcall_Call at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:257:24 38: _PyObject_Call at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:328:16 39: do_call_core at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12 40: _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22 41: _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 42: _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 43: do_call_core at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12 44: _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22 45: _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 46: _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 47: do_call_core at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12 48: _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22 49: _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 50: _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 51: _PyVectorcall_Call at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:257:24 52: _PyObject_Call at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:328:16 53: do_call_core at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12 54: _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22 55: _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 56: _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 57: _PyObject_VectorcallTstate at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11 58: method_vectorcall at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:59:18 59: _PyVectorcall_Call at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:257:24 60: _PyObject_Call at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:328:16 61: do_call_core at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12 62: _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22 63: _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 64: _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 65: do_call_core at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12 66: _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22 67: _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 68: _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 69: do_call_core at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12 70: _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22 71: _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 72: _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 73: do_call_core at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12 74: _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22 75: _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 76: _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 77: do_call_core at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12 78: _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22 79: _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 80: _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 81: _PyVectorcall_Call at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:257:24 82: _PyObject_Call at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:328:16 83: do_call_core at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12 84: _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22 85: _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 86: _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 87: _PyVectorcall_Call at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:257:24 88: _PyObject_Call at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:328:16 89: do_call_core at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12 90: _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22 91: _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 92: _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 93: _PyObject_VectorcallTstate at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11 94: method_vectorcall at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:59:18 95: _PyVectorcall_Call at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:257:24 96: _PyObject_Call at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:328:16 97: do_call_core at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12 98: _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22 99: _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 100: _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 101: _PyObject_FastCallDictTstate at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:141:15 102: _PyObject_Call_Prepend at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:482:24 103: slot_tp_init at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/typeobject.c:7855:15 104: type_call at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/typeobject.c:1103:19 105: _PyObject_MakeTpCall at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:214:18 106: _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:4769:23 107: _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 108: _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 109: PyEval_EvalCode at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:1148:21 110: builtin_exec_impl at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/bltinmodule.c:1077:17 111: builtin_exec at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/clinic/bltinmodule.c.h:465:20 112: cfunction_vectorcall_FASTCALL_KEYWORDS at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/methodobject.c:443:24 113: _PyObject_VectorcallTstate at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11 114: PyObject_Vectorcall at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:299:12 115: _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:4769:23 116: _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 117: _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 118: pymain_run_module at /tmp/python-build.20240618093858.518/Python-3.11.9/Modules/main.c:300:14 119: pymain_run_python at /tmp/python-build.20240618093858.518/Python-3.11.9/Modules/main.c:595:21 120: Py_RunMain at /tmp/python-build.20240618093858.518/Python-3.11.9/Modules/main.c:680:5 121: pymain_main at /tmp/python-build.20240618093858.518/Python-3.11.9/Modules/main.c:710:12 122: Py_BytesMain at /tmp/python-build.20240618093858.518/Python-3.11.9/Modules/main.c:734:12 123: 124: __libc_start_main 125: _start note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. ```
ritchie46 commented 1 month ago

Hmm... I don't understand where the parquet writer comes from? Is that somewhere else?

douglas-raillard-arm commented 1 month ago

I think this failure is down the line in another place, on another dataframe. So enabling these options "fixed" the issue reported here. I'll make another run and see whether that behavior is stable.

douglas-raillard-arm commented 1 month ago

Did another run, same output failing in sink_parquet(): https://readthedocs.org/api/v2/build/25750324.txt

douglas-raillard-arm commented 3 weeks ago

I re-ran the code with the sink_parquet() removed, and the issue is the same as before, now with polars 1.9.0: https://readthedocs.org/api/v2/build/25824188.txt

  File "/home/docs/checkouts/readthedocs.org/user_builds/lisa-linux-integrated-system-analysis/envs/test-rtd/lib/python3.11/site-packages/polars/lazyframe/frame.py", line 2050, in collect
    return wrap_df(ldf.collect(callback))
                   ^^^^^^^^^^^^^^^^^^^^^
pyo3_runtime.PanicException: Series: line, length 1 doesn't match the DataFrame height of 3

And the verbose backtrace:

thread '' panicked at /home/runner/work/polars/polars/crates/polars-error/src/lib.rs:45:37: Series: line, length 1 doesn't match the DataFrame height of 3 If you want this Series to be broadcasted, ensure it is a scalar (for instance by adding '.first()'). stack backtrace: 0: 0x7f522b35c98f - ::fmt::hef94149e34fd3e35 1: 0x7f52270c8ed3 - core::fmt::write::h819a4812d9188cb7 2: 0x7f522b320eb2 - std::io::Write::write_fmt::hf02218f278604e55 3: 0x7f522b35e012 - std::sys::backtrace::BacktraceLock::print::h083ca4ba72ccf19b 4: 0x7f522b35de74 - std::panicking::default_hook::{{closure}}::h6315662661f8bf89 5: 0x7f522b35e5e8 - std::panicking::rust_panic_with_hook::h86983346224fbabd 6: 0x7f522b35e158 - std::panicking::begin_panic_handler::{{closure}}::h8f4980b007e577ab 7: 0x7f522b35e0b9 - std::sys::backtrace::__rust_end_short_backtrace::h94ead2b80c5d4a2c 8: 0x7f522b35e0ae - rust_begin_unwind 9: 0x7f52270c746f - core::panicking::panic_fmt::h62749edbb2a4703e 10: 0x7f5227690ff7 - >::from::panic_cold_display::h0422432d23cb6a45 11: 0x7f52286109e1 - >::from::h6244b1c6667b3c09 12: 0x7f5228706081 - polars_mem_engine::executors::projection_utils::check_expand_literals::hfafbab8300d43d9e 13: 0x7f5228703016 - polars_mem_engine::executors::projection::ProjectionExec::execute_impl::h31eba3e3c1a600f7 14: 0x7f5228702475 - ::execute::h5064cd7033a3aaa2 15: 0x7f5228800b34 - ::execute::hf0ee8e35d70c633c 16: 0x7f52287fcafc - ::execute::h7889471b8002069f 17: 0x7f52287fcafc - ::execute::h7889471b8002069f 18: 0x7f5228800b34 - ::execute::hf0ee8e35d70c633c 19: 0x7f52285ec11f - polars_lazy::frame::LazyFrame::collect::h2cf25f81c710fe6b 20: 0x7f522a5b0f3e - polars_python::lazyframe::general::::__pymethod_collect__::h46bdc0e011300fc1 21: 0x7f5229dda1e8 - pyo3::impl_::trampoline::trampoline::h4527e662b3f15518 22: 0x7f522a591711 - polars_python::lazyframe::general::_::__INVENTORY::trampoline::h8f533870aeecd10d 23: 0x7f5242669792 - method_vectorcall_VARARGS_KEYWORDS at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/descrobject.c:364:14 24: 0x7f524265ca38 - _PyObject_VectorcallTstate at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11 25: 0x7f524265ca38 - PyObject_Vectorcall at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:299:12 26: 0x7f52425ff5df - _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:4769:23 27: 0x7f5242757a41 - _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 28: 0x7f5242757a41 - _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 29: 0x7f524265f4b6 - _PyObject_VectorcallTstate at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11 30: 0x7f524265f4b6 - method_vectorcall at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:89:18 31: 0x7f52425fff26 - do_call_core at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12 32: 0x7f52425fff26 - _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22 33: 0x7f5242757a41 - _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 34: 0x7f5242757a41 - _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 35: 0x7f524265f4b6 - _PyObject_VectorcallTstate at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11 36: 0x7f524265f4b6 - method_vectorcall at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:89:18 37: 0x7f52425fff26 - do_call_core at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12 38: 0x7f52425fff26 - _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22 39: 0x7f5242757a41 - _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 40: 0x7f5242757a41 - _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 41: 0x7f524265f4b6 - _PyObject_VectorcallTstate at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11 42: 0x7f524265f4b6 - method_vectorcall at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:89:18 43: 0x7f52425fff26 - do_call_core at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12 44: 0x7f52425fff26 - _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22 45: 0x7f5242757a41 - _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 46: 0x7f5242757a41 - _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 47: 0x7f524265f4b6 - _PyObject_VectorcallTstate at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11 48: 0x7f524265f4b6 - method_vectorcall at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:89:18 49: 0x7f52425fff26 - do_call_core at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12 50: 0x7f52425fff26 - _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22 51: 0x7f5242757a41 - _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 52: 0x7f5242757a41 - _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 53: 0x7f524265f4b6 - _PyObject_VectorcallTstate at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11 54: 0x7f524265f4b6 - method_vectorcall at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:89:18 55: 0x7f52425fff26 - do_call_core at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12 56: 0x7f52425fff26 - _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22 57: 0x7f5242757a41 - _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 58: 0x7f5242757a41 - _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 59: 0x7f524265f4b6 - _PyObject_VectorcallTstate at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11 60: 0x7f524265f4b6 - method_vectorcall at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:89:18 61: 0x7f52425fff26 - do_call_core at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12 62: 0x7f52425fff26 - _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22 63: 0x7f5242757a41 - _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 64: 0x7f5242757a41 - _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 65: 0x7f524265f4b6 - _PyObject_VectorcallTstate at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11 66: 0x7f524265f4b6 - method_vectorcall at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:89:18 67: 0x7f52425fff26 - do_call_core at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12 68: 0x7f52425fff26 - _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22 69: 0x7f5242757a41 - _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 70: 0x7f5242757a41 - _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 71: 0x7f524265f4b6 - _PyObject_VectorcallTstate at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11 72: 0x7f524265f4b6 - method_vectorcall at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:89:18 73: 0x7f52425fff26 - do_call_core at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12 74: 0x7f52425fff26 - _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22 75: 0x7f5242757a41 - _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 76: 0x7f5242757a41 - _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 77: 0x7f524265f4b6 - _PyObject_VectorcallTstate at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11 78: 0x7f524265f4b6 - method_vectorcall at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:89:18 79: 0x7f52425fff26 - do_call_core at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12 80: 0x7f52425fff26 - _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22 81: 0x7f5242757a41 - _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 82: 0x7f5242757a41 - _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 83: 0x7f524265f4b6 - _PyObject_VectorcallTstate at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11 84: 0x7f524265f4b6 - method_vectorcall at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:89:18 85: 0x7f52425fff26 - do_call_core at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12 86: 0x7f52425fff26 - _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22 87: 0x7f5242757a41 - _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 88: 0x7f5242757a41 - _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 89: 0x7f524265f4b6 - _PyObject_VectorcallTstate at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11 90: 0x7f524265f4b6 - method_vectorcall at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:89:18 91: 0x7f52425fff26 - do_call_core at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12 92: 0x7f52425fff26 - _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22 93: 0x7f5242757a41 - _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 94: 0x7f5242757a41 - _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 95: 0x7f524265f4b6 - _PyObject_VectorcallTstate at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11 96: 0x7f524265f4b6 - method_vectorcall at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:89:18 97: 0x7f52425fff26 - do_call_core at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12 98: 0x7f52425fff26 - _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22 99: 0x7f5242757a41 - _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 100: 0x7f5242757a41 - _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 101: 0x7f524265f4b6 - _PyObject_VectorcallTstate at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11 102: 0x7f524265f4b6 - method_vectorcall at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:89:18 103: 0x7f52425fff26 - do_call_core at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12 104: 0x7f52425fff26 - _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22 105: 0x7f5242757a41 - _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 106: 0x7f5242757a41 - _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 107: 0x7f524265f4b6 - _PyObject_VectorcallTstate at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11 108: 0x7f524265f4b6 - method_vectorcall at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:89:18 109: 0x7f52425fff26 - do_call_core at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12 110: 0x7f52425fff26 - _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22 111: 0x7f5242757a41 - _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 112: 0x7f5242757a41 - _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 113: 0x7f524265f4b6 - _PyObject_VectorcallTstate at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11 114: 0x7f524265f4b6 - method_vectorcall at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:89:18 115: 0x7f52425fff26 - do_call_core at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12 116: 0x7f52425fff26 - _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22 117: 0x7f5242757a41 - _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 118: 0x7f5242757a41 - _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 119: 0x7f524265f4b6 - _PyObject_VectorcallTstate at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11 120: 0x7f524265f4b6 - method_vectorcall at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:89:18 121: 0x7f52425fff26 - do_call_core at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12 122: 0x7f52425fff26 - _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22 123: 0x7f5242757a41 - _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 124: 0x7f5242757a41 - _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 125: 0x7f524265f4b6 - _PyObject_VectorcallTstate at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11 126: 0x7f524265f4b6 - method_vectorcall at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:89:18 127: 0x7f52425fff26 - do_call_core at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12 128: 0x7f52425fff26 - _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22 129: 0x7f5242757a41 - _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 130: 0x7f5242757a41 - _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 131: 0x7f524265f4b6 - _PyObject_VectorcallTstate at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11 132: 0x7f524265f4b6 - method_vectorcall at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:89:18 133: 0x7f52425fff26 - do_call_core at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12 134: 0x7f52425fff26 - _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22 135: 0x7f5242757a41 - _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 136: 0x7f5242757a41 - _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 137: 0x7f524265c574 - _PyObject_FastCallDictTstate at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:152:15 138: 0x7f524265c830 - _PyObject_Call_Prepend at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:482:24 139: 0x7f52426d219b - slot_tp_init at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/typeobject.c:7855:15 140: 0x7f52426c96e7 - type_call at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/typeobject.c:1103:19 141: 0x7f524265c387 - _PyObject_MakeTpCall at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:214:18 142: 0x7f52425ff5df - _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:4769:23 143: 0x7f5242757a41 - _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 144: 0x7f5242757a41 - _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 145: 0x7f524265f548 - _PyObject_VectorcallTstate at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11 146: 0x7f524265f548 - method_vectorcall at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:59:18 147: 0x7f524265c180 - _PyVectorcall_Call at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:257:24 148: 0x7f524265c180 - _PyObject_Call at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:328:16 149: 0x7f52425fff26 - do_call_core at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12 150: 0x7f52425fff26 - _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22 151: 0x7f5242757a41 - _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 152: 0x7f5242757a41 - _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 153: 0x7f524265f548 - _PyObject_VectorcallTstate at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11 154: 0x7f524265f548 - method_vectorcall at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:59:18 155: 0x7f524265c180 - _PyVectorcall_Call at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:257:24 156: 0x7f524265c180 - _PyObject_Call at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:328:16 157: 0x7f52425fff26 - do_call_core at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12 158: 0x7f52425fff26 - _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22 159: 0x7f5242757a41 - _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 160: 0x7f5242757a41 - _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 161: 0x7f52425fff26 - do_call_core at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12 162: 0x7f52425fff26 - _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22 163: 0x7f5242757a41 - _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 164: 0x7f5242757a41 - _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 165: 0x7f52425fff26 - do_call_core at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12 166: 0x7f52425fff26 - _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22 167: 0x7f5242757a41 - _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 168: 0x7f5242757a41 - _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 169: 0x7f524282a02e - bounded_lru_cache_wrapper at /tmp/python-build.20240618093858.518/Python-3.11.9/./Modules/_functoolsmodule.c:1021:14 170: 0x7f524265c07c - _PyObject_Call at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:343:19 171: 0x7f524265c07c - _PyObject_Call at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:313:1 172: 0x7f52425fff26 - do_call_core at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12 173: 0x7f52425fff26 - _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22 174: 0x7f5242757a41 - _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 175: 0x7f5242757a41 - _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 176: 0x7f52425fff26 - do_call_core at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12 177: 0x7f52425fff26 - _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22 178: 0x7f5242757a41 - _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 179: 0x7f5242757a41 - _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 180: 0x7f524265c92e - _PyObject_VectorcallTstate at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11 181: 0x7f524265c92e - PyObject_CallOneArg at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:376:12 182: 0x7f52426b2c9f - _PyObject_GenericGetAttrWithDict at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/object.c:1278:19 183: 0x7f52426b257b - PyObject_GetAttr at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/object.c:916:19 184: 0x7f52425fe341 - _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:3461:29 185: 0x7f5242757a41 - _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 186: 0x7f5242757a41 - _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 187: 0x7f52425fff26 - do_call_core at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12 188: 0x7f52425fff26 - _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22 189: 0x7f5242757a41 - _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 190: 0x7f5242757a41 - _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 191: 0x7f52425fff26 - do_call_core at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12 192: 0x7f52425fff26 - _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22 193: 0x7f5242757a41 - _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 194: 0x7f5242757a41 - _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 195: 0x7f52425fff26 - do_call_core at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12 196: 0x7f52425fff26 - _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22 197: 0x7f5242757a41 - _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 198: 0x7f5242757a41 - _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 199: 0x7f524265c180 - _PyVectorcall_Call at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:257:24 200: 0x7f524265c180 - _PyObject_Call at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:328:16 201: 0x7f52425fff26 - do_call_core at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12 202: 0x7f52425fff26 - _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22 203: 0x7f5242757a41 - _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 204: 0x7f5242757a41 - _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 205: 0x7f524265c180 - _PyVectorcall_Call at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:257:24 206: 0x7f524265c180 - _PyObject_Call at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:328:16 207: 0x7f52425fff26 - do_call_core at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12 208: 0x7f52425fff26 - _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22 209: 0x7f5242757a41 - _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 210: 0x7f5242757a41 - _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 211: 0x7f524265f548 - _PyObject_VectorcallTstate at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11 212: 0x7f524265f548 - method_vectorcall at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/classobject.c:59:18 213: 0x7f524265c180 - _PyVectorcall_Call at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:257:24 214: 0x7f524265c180 - _PyObject_Call at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:328:16 215: 0x7f52425fff26 - do_call_core at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:7349:12 216: 0x7f52425fff26 - _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:5376:22 217: 0x7f5242757a41 - _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 218: 0x7f5242757a41 - _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 219: 0x7f524265c508 - _PyObject_FastCallDictTstate at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:141:15 220: 0x7f524265c7c9 - _PyObject_Call_Prepend at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:482:24 221: 0x7f52426d219b - slot_tp_init at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/typeobject.c:7855:15 222: 0x7f52426c96e7 - type_call at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/typeobject.c:1103:19 223: 0x7f524265c387 - _PyObject_MakeTpCall at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:214:18 224: 0x7f52425ff5df - _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:4769:23 225: 0x7f52427578df - _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 226: 0x7f52427578df - _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 227: 0x7f52427578df - PyEval_EvalCode at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:1148:21 228: 0x7f52427537f0 - builtin_exec_impl at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/bltinmodule.c:1077:17 229: 0x7f52427537f0 - builtin_exec at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/clinic/bltinmodule.c.h:465:20 230: 0x7f52426ae0f6 - cfunction_vectorcall_FASTCALL_KEYWORDS at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/methodobject.c:443:24 231: 0x7f524265ca38 - _PyObject_VectorcallTstate at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_call.h:92:11 232: 0x7f524265ca38 - PyObject_Vectorcall at /tmp/python-build.20240618093858.518/Python-3.11.9/Objects/call.c:299:12 233: 0x7f52425ff5df - _PyEval_EvalFrameDefault at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:4769:23 234: 0x7f5242757a41 - _PyEval_EvalFrame at /tmp/python-build.20240618093858.518/Python-3.11.9/./Include/internal/pycore_ceval.h:73:16 235: 0x7f5242757a41 - _PyEval_Vector at /tmp/python-build.20240618093858.518/Python-3.11.9/Python/ceval.c:6434:24 236: 0x7f52427c4b37 - pymain_run_module at /tmp/python-build.20240618093858.518/Python-3.11.9/Modules/main.c:300:14 237: 0x7f52427c5243 - pymain_run_python at /tmp/python-build.20240618093858.518/Python-3.11.9/Modules/main.c:595:21 238: 0x7f52427c5243 - Py_RunMain at /tmp/python-build.20240618093858.518/Python-3.11.9/Modules/main.c:680:5 239: 0x7f52427c5ace - pymain_main at /tmp/python-build.20240618093858.518/Python-3.11.9/Modules/main.c:710:12 240: 0x7f52427c5ace - Py_BytesMain at /tmp/python-build.20240618093858.518/Python-3.11.9/Modules/main.c:734:12 241: 0x7f52422f1d90 - 242: 0x7f52422f1e40 - __libc_start_main 243: 0x560becdb0095 - _start 244: 0x0 -
ritchie46 commented 2 weeks ago

Alright, I know where it happens now. Added the same trick, so you should (hopefully) get an error message showing the expression that caused it.

And a way to temporarily silence the error. Can you come back with the faulting expression after next release?

douglas-raillard-arm commented 2 weeks ago

Sounds good, thanks

douglas-raillard-arm commented 1 day ago

Looks like I get another issue now with 1.11 , related to the type of the column (Time should be u64, not a string): https://readthedocs.org/api/v2/build/26067058.txt

I'll investigate further, with enough luck that can be reproduced locally and it's possibly hiding the original issue we discussed here.

douglas-raillard-arm commented 1 day ago

@ritchie46 I tried locally with polars 1.11 both with Python 3.11 and 3.12 and it runs without problems. It only fails in the CI, so I guess this is just the new manifestation of the same underlying issue:

https://readthedocs.org/api/v2/build/26068615.txt

pyo3_runtime.PanicException: unexpected value while building Series of type Int64; found value of type String: "Time"

This happens while converting the following pandas df to polars:

pl.from_pandas(df, include_index=True)
          __cpu  __pid  frequency  cpu  __comm
Time                                          
0.004580      5      0     450000    0  <idle>
0.004582      5      0     450000    3  <idle>
0.004585      5      0     450000    4  <idle>
0.004587      5      0     450000    5  <idle>
0.050529      0   3807     575000    0    sshd
...         ...    ...        ...  ...     ...
2.484556      5      0     450000    3  <idle>
2.484558      5      0     450000    4  <idle>
2.484560      5      0     450000    5  <idle>
2.496534      1   5741     950000    1    sshd
2.496535      1   5741     950000    2    sshd

[352 rows x 5 columns]

df.info() shows this

<class 'pandas.core.frame.DataFrame'>
Index: 352 entries, 0.00457992 to 2.4965352800000002
Data columns (total 5 columns):
 #   Column     Non-Null Count  Dtype   
---  ------     --------------  -----   
 0   __cpu      352 non-null    uint32  
 1   __pid      352 non-null    int32   
 2   frequency  352 non-null    uint32  
 3   cpu        352 non-null    uint32  
 4   __comm     352 non-null    category
dtypes: category(1), int32(1), uint32(3)
memory usage: 9.3 KB

And the index is float64:

Index([           0.00457992, 0.0045823800000000005,            0.00458452,
                  0.00458656,            0.05052936,            0.05053342,
                  0.05053676,            0.05054004,  0.060652920000000006,
         0.06065624000000001,
       ...
                  2.47257768,            2.47257974,            2.48102298,
                  2.48102532,    2.4845535620000003,            2.48455628,
                  2.48455826,             2.4845601,            2.49653368,
          2.4965352800000002],
      dtype='float64', name='Time', length=352)

EDIT: s/include_index='Time'/include_index=True/