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

[BUG] Creating a task requires an estimation procedure ID, but procedure is not correctly created

未关闭
#1,751 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
55/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
python

调研方向

The issue is in openml/tasks/task.py, specifically the create_task() function and the OpenMLTask class handling of estimation_procedure_id. Start by examining the default value flow and where the procedure becomes None. Test with the provided script on a local docker instance to reproduce the error. Check the split dimensions and estimation procedure attributes after task creation to confirm the bug.

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

描述

module:Task

It is important to first note that the tasks/task.py appears to be slightly different from the version obtainable through pip install "openml==0.15.1", which would've elevated the priority while reducing the effort had the GitHub version not experienced the same bug.

The create_task() function requires an estimation_procedure_id parameter despite it having a default value in all cases, which all funnel towards the same OpenMLTask class where the handling of estimation procedure appears to break*.
It was tested without publication on the main server, as well as with publication on a local docker instance (test server does not have any procedures), where in both cases the create_task() function creates a task with Estimation Procedure equal to None and no data split (errors follow).

import openml
from openml.tasks import TaskType

openml.config.server = "..."
openml.config.apikey = "..."

did = 128  # iris

try:
    my_task = openml.tasks.create_task(
        task_type=TaskType.SUPERVISED_CLASSIFICATION,
        dataset_id=did,
        target_name="class",
        evaluation_measure="predictive_accuracy",
        estimation_procedure_id=1,
    )
    my_task.publish()
except openml.exceptions.OpenMLServerException as e:
    # Error code for 'task already exists'
    if e.code == 614:
        # Lookup task
        tasks = openml.tasks.list_tasks(data_id=did, output_format='dataframe')
        tasks = tasks.query(
            'task_type == "Supervised Classification" '
            'and estimation_procedure == "10-fold Crossvalidation" '
            'and evaluation_measures == "predictive_accuracy"'
        )
        display(tasks)
        task_id = tasks.loc[:, "tid"].values[0]
        print("Task already exists. Task ID is", task_id)
    
print(my_task)
print(my_task.estimation_procedure)
print(my_task.get_split_dimensions())

* Unconfirmed, however it is a good starting point.

主要语言
Python
星标
361
派生
296
PR 合并指标
30 天内没有已合并 PR

贡献指南

打开贡献指南

从这里开始

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

openml/openml-python 的其他 Issue

查看 openml/openml-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

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