Skip to content

TypeError: cannot pickle '_abc._abc_data' object with python 3.14 and cloudpickle 3.1.2 #585

@thomass-dev

Description

@thomass-dev

Following #572.

This snippet raises cloudpicke exception:

# python==3.14
# skore==0.11.4
# scikit-learn==1.8.0
# cloudpickle==3.1.2

from cloudpickle import dumps
from sklearn.datasets import make_regression
from sklearn.linear_model import LinearRegression
from sklearn.model_selection import train_test_split
from skore import EstimatorReport, set_config
from skore._utils._parallel import _FuncWrapper

set_config(show_progress=False)

X, y = make_regression(random_state=42)
X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=42)
report = EstimatorReport(
    LinearRegression(),
    X_train=X_train,
    y_train=y_train,
    X_test=X_test,
    y_test=y_test,
)

dumps(_FuncWrapper(report.metrics.summarize))
TypeError: cannot pickle '_abc._abc_data' object
when serializing dict item '_abc_impl'
when serializing tuple item 0
when serializing cell reconstructor arguments
when serializing cell object
when serializing tuple item 0
when serializing dict item '__closure__'
when serializing tuple item 1
when serializing function state
when serializing function object
when serializing dict item '__annotate__'
when serializing skore._utils._parallel._FuncWrapper state
when serializing skore._utils._parallel._FuncWrapper object

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