Thanks to visit codestin.com
Credit goes to github.com

Skip to content

data display fails when mixing numpy and polars or when X and y have column names in common#3122

Description

@jeromedockes
import skore
import polars as pl
import numpy as np
from sklearn.dummy import DummyRegressor

rng = np.random.default_rng()
X = rng.normal(size=(100, 10))
y = rng.normal(size=(100, 2))
>>> skore.evaluate(DummyRegressor(), X=X, y=pl.DataFrame(y), splitter=3).data.summarize()
Traceback (most recent call last):
    ...
TypeError: cannot concatenate object of type '<class 'polars.dataframe.frame.DataFrame'>'; only Series and DataFrame objs are valid
>>> skore.evaluate(DummyRegressor(), X=pl.DataFrame(X), y=y, splitter=3).data.summarize()
Traceback (most recent call last):
    ...
AttributeError: 'DataFrame' object has no attribute '_df'
>>> skore.evaluate(DummyRegressor(), X=pl.DataFrame(X), y=pl.DataFrame(y), splitter=3).data.summarize()
Traceback (most recent call last):
    ...
polars.exceptions.DuplicateError: could not create a new DataFrame: column with name 'column_0' has more than one occurrence

Activity

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions