Skip to content

[ENH] Default list_setups to dataframe - #1769

Open
arcwiser wants to merge 1 commit into
openml:mainfrom
arcwiser:fix/list-setups-dataframe
Open

arcwiser wants to merge 1 commit into
openml:mainfrom
arcwiser:fix/list-setups-dataframe

Conversation

@arcwiser

Copy link
Copy Markdown

Metadata

Details

list_setups was the remaining listing API whose default output was not a pandas DataFrame. This changes its default from "object" to "dataframe" while preserving explicit output_format="object" support for callers that need OpenMLSetup instances.

The DataFrame construction now declares its columns so an empty server response returns an empty DataFrame with the same setup_id index and flow_id/parameters columns as a populated response.

Tests cover populated and empty default results without requiring a server. Existing integration coverage now verifies the DataFrame default and the explicit object compatibility path.

Tested on Windows with Python 3.10:

  • pytest tests/test_setups/test_setup_functions.py::test_list_setups_defaults_to_dataframe -q (2 passed)
  • pytest tests/test_setups/test_setup_functions.py -m "not production_server and not test_server" -q (2 passed, 10 deselected)
  • pytest tests/test_setups/test_setup_functions.py::TestSetupFunctions::test_list_setups_output_format -q against the production OpenML API (1 passed)
  • pre-commit run --files openml/setups/functions.py tests/test_setups/test_setup_functions.py (all hooks passed)
  • git diff --check upstream/main HEAD

AI-assisted: yes. The contributor reviewed and is responsible for the submitted changes.

Signed-off-by: arcwiser <arcwiser@users.noreply.github.com>

This branch has not been deployed

No deployments
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.

Default output_format to "dataframe"

1 participant