feat: Add CLI commands for browsing and searching OpenML flows (models) #1487
+741
−5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Metadata
Reference Issue :Enhancement Add CLI commands for browsing and searching OpenML flows (models) #1486
New Tests Added: Yes
Documentation Updated: No (CLI help text serves as documentation)
Change Log Entry: "Add CLI commands for browsing and searching OpenML flows (models):
openml models list,openml models info, andopenml models search"Details
What does this PR implement/fix?
This PR adds three new CLI subcommands under
openml modelsto improve the user experience of the model catalogue:openml models list- List flows (models) with optional filtering (tag, uploader, pagination, output format)openml models info <flow_id>- Display detailed information about a specific flowopenml models search <query>- Search flows by name with case-insensitive matchingWhy is this change necessary? What is the problem it solves?
Currently, users must write Python code to browse or search OpenML flows, even for simple tasks like listing available models or finding a specific model. This creates a barrier to entry and makes the model catalogue less accessible. Adding CLI commands allows users to interact with the model catalogue directly from the command line without writing code.
This directly addresses the ESoC 2025 goal of "Improving user experience of the model catalogue in AIoD and openML".
How can I reproduce the issue this PR is solving and its solution?
Before (requires Python code):
import openml
flows = openml.flows.list_flows(size=10)
for _, row in flows.iterrows():
print(row['name'])
After (CLI commands):
List first 10 flows
openml models list --size 10
Search for RandomForest models
openml models search RandomForest
Get detailed info about a model
openml models info 12345
List models with a specific tag
openml models list --tag sklearn --format table --verboseImplementation Details:
openml/cli.py:models_list(),models_info(), andmodels_search()tests/test_openml/test_cli.pyopenml.flows.list_flows()andopenml.flows.get_flow()functions - no changes to core APIconfigurecommand)Any other comments?