Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#1,751 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Python
Stelle
361
Fork
296
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di openml/openml-python

Tutte le issue di openml/openml-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.