Skip to content

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

@kartikmandar

Description

@kartikmandar

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)

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