Closed koaning closed 3 weeks ago
@koaning to quickly fix your notebook, please use df_polars.to_pandas()
to convert dataframe from polars
to pandas
instead of pd.Dataframe(df_polars)
, it will convert automatically numpy.array
to dict/list.
I'm fixing on our side.
edit* to be more precise and resume, there are 2 problems:
numpy-array
here) is not actually well serialized in the back-end,polars
to pandas
.The problem seems to be that in your dataframe, the sixth column "params" is a struct, which gets converted to a numpy array when converting to pandas. So far we've assumed that values in dataframes are simple (ints, strings); we're working on a fix now!
Ah yeah, that is accurate. The cv results also put JSON stuff in there. I suppose this makes sense, but maybe for the future it would be nice if part of the traceback would still be shown here.
@koaning the fix is under review #621 .
Have you tried this:
to quickly fix your notebook, please use df_polars.to_pandas() to convert dataframe from polars to pandas instead of pd.Dataframe(df_polars), it will convert automatically numpy.array to dict/list.
I can confirm that this indeed works.
I wonder, maybe just as a safety mechanism, would it make sense to check if an item can render during the .put
call? The reason I bring this up is because it feels really brittle that a single .put
call can bring the entire frontend experience down. If a colleague does this by accident, I may no longer be able to render any of the previous views. Not to mention the fact it would be very hard to figure out where the issue is.
Debugging stuff like this feels hard enough that we may want to be really defensive about it.
I think its mainly a backend responsability to assure that all added items can be exported. But you're true, we shoudn't block the whole frontend experience when an item can't be exported. I've added an new issue: #628 .
Describe the bug
I tried running skore from Jupyter with this line:
When I looked at the browser I saw this:
The notebook contained this traceback.
Steps/Code to Reproduce
Figured that I might try and paste the markdown below of the notebook.
Expected Behavior
I would not have expected an error at all, but a more helpful error message would have also been grand.
Actual Behavior
see above.
Environment