openml-python icon indicating copy to clipboard operation
openml-python copied to clipboard

Bug: Clustering tasks don't extract estimation procedure details from server XML

Open kartikmandar opened this issue 2 months ago • 0 comments

Description

Clustering tasks (TaskType.CLUSTERING) are not having their estimation procedure details properly extracted from server XML, resulting in None values.

Current Behavior

task = openml.tasks.get_task(126033)  # Clustering task
print(task.estimation_procedure)
# {'type': None, 'parameters': None, 'data_splits_url': None}

Expected Behavior

task.estimation_procedure
# {'type': 'testontrainingdata', 'parameters': {'number_repeats': '50'}, 
#  'data_splits_url': 'https://...'}

Root Cause

In _create_task_from_xml() (tasks/functions.py:495), TaskType.CLUSTERING
is not included in the if block that extracts estimation procedure details.

There is already a TODO comment for this: # TODO: add OpenMLClusteringTask?

Add TaskType.CLUSTERING to the if block, with edge case handling for:
1. Empty estimation_procedure_id (some tasks have empty values)
2. Empty target_name (unsupervised tasks)

kartikmandar avatar Nov 27 '25 21:11 kartikmandar