Skip to content

added list_estimation_procedure in init files and returns a dict[int,…#1721

Open
Manas-7854 wants to merge 2 commits intoopenml:mainfrom
Manas-7854:invalid_procedure_ids_1249
Open

added list_estimation_procedure in init files and returns a dict[int,…#1721
Manas-7854 wants to merge 2 commits intoopenml:mainfrom
Manas-7854:invalid_procedure_ids_1249

Conversation

@Manas-7854
Copy link

fixes: #1249

  • added openml/evaluations/list_estimation_procedures to evaluations/init.py and openml/init.py to make it accessable
  • the function now return a dict[int,str] i.e. id to procedure name mapping

Copilot AI review requested due to automatic review settings March 18, 2026 16:13
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR exposes list_estimation_procedures via openml.evaluations and the top-level openml package, and changes the function to return an id -> name mapping to help users discover valid estimation_procedure_id values (related to #1249).

Changes:

  • Change openml.evaluations.list_estimation_procedures() to return dict[int, str] (id-to-name mapping) instead of a list of names.
  • Re-export list_estimation_procedures from openml/evaluations/__init__.py and openml/__init__.py for easier access.
  • Add integration tests asserting return type and top-level accessibility.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
openml/evaluations/functions.py Changes list_estimation_procedures return type to dict[int,str] and updates docstring accordingly.
openml/evaluations/__init__.py Re-exports list_estimation_procedures from the evaluations package.
openml/__init__.py Re-exports list_estimation_procedures at the top-level openml namespace and adds it to __all__.
tests/test_evaluations/test_evaluation_functions.py Adds tests for the new return type and top-level access.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +301 to +309
def list_estimation_procedures() -> dict[int, str]:
"""Return dictionary of evaluation procedures available.

The function performs an API call to retrieve the entire list of
evaluation procedures' names that are available.
evaluation procedures' ids and names that are available.

Returns
-------
list
dict[int, str]
Comment on lines 302 to 306
"""Return dictionary of evaluation procedures available.

The function performs an API call to retrieve the entire list of
evaluation procedures' names that are available.
evaluation procedures' ids and names that are available.

Comment on lines +285 to +289
def test_list_estimation_procedures_valid_id_for_task_creation(self):
procedures = openml.evaluations.list_estimation_procedures()
first_id = list(procedures.keys())[0]
assert isinstance(first_id, int)
assert first_id > 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Invalid estimation procedure ids

2 participants