Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

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

未关闭
#585 21 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
python
领域
tooling

调研方向

使用 cloudpickle 3.1.2 运行提供的 Python 3.14 reproducer,并查看 cloudpipe/cloudpickle#572。跟踪从 skore._utils._parallel 中的 _FuncWrapper 开始,经过函数闭包和 traceback 中显示的 _abc_impl 状态的序列化过程。完成标准是:在报告的版本下,相同的 dumps 调用不再引发 TypeError,并为此情况添加回归检查。

由索引模型根据 Issue 内容生成。

描述

Following https://github.com/cloudpipe/cloudpickle/issues/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
主要语言
Python
星标
1.9k
派生
197
平均合并
1 天 10 小时
30 天内合并 PR
1

环境准备

我们还没有检查这个项目的环境配置文件。先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

cloudpipe/cloudpickle 的其他 Issue

查看 cloudpipe/cloudpickle 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。