Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

feat: Add CLI Commands for Browsing and Searching OpenML Tasks

未关闭
#1,504 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
68/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
停滞
技术栈
python

调研方向

Start in openml/cli.py, following the existing configure and models command patterns and the tasks_list(), tasks_info(), and tasks_search() entry points. Then read tests/test_openml/test_cli.py and the existing openml.tasks.list_tasks() and get_task() APIs. Done means the three tasks subcommands support the described arguments and mocked tests pass.

由索引模型根据 Issue 内容生成。

描述

Metadata

New Tests Added: Yes

Documentation Updated: No (CLI help text serves as documentation)

Change Log Entry: "Add CLI commands for browsing and searching OpenML tasks: openml tasks list, openml tasks info, and openml tasks search"

Details
What does this PR implement/fix?
This PR adds three new CLI subcommands under openml tasks to improve the user experience of the task catalogue:

openml tasks list - List tasks with optional filtering (tag, task_type, size, pagination, output format)
openml tasks info <task_id> - Display detailed information about a specific task including dataset, task type, target feature, and evaluation measure
openml tasks search - Search tasks by associated dataset name with case-insensitive matching
Why is this change necessary? What is the problem it solves?
Currently, users must write Python code to browse or search OpenML tasks, even for simple tasks like listing available tasks or finding tasks for a specific dataset. This creates a barrier to entry and makes the task catalogue less accessible. Adding CLI commands allows users to interact with the task catalogue directly from the command line without writing code.

This directly addresses the ESoC 2025 goal of "Improving user experience of the task catalogue in AIoD and OpenML".

How can I reproduce the issue this PR is solving and its solution?
Before (requires Python code):

import openml
tasks = openml.tasks.list_tasks(size=10)
for tid in tasks:
    task = openml.tasks.get_task(tid)
    print(f"{tid}: {task.task_type}")

After (CLI commands):

# List first 10 tasks
openml tasks list --size 10
# Search for tasks related to iris dataset
openml tasks search iris
# Get detailed info about a task
openml tasks info 1
# List classification tasks with a specific tag
openml tasks list --task-type "Supervised Classification" --tag study_14 --format table
# List tasks with pagination
openml tasks list --offset 20 --size 10

Implementation Details:
Added three new functions in openml/cli.py: tasks_list(), tasks_info(), and tasks_search()
Integrated into main CLI parser with proper argument handling
Added comprehensive test suite in tests/test_openml/test_cli.py
Uses existing openml.tasks.list_tasks() and openml.tasks.get_task() functions - no changes to core API
Follows existing CLI patterns (similar to configure and models commands)
All tests use mocked API calls to avoid requiring server connections
Any other comments?
All pre-commit hooks pass (ruff, mypy, formatting)
No breaking changes
Follows project code style and patterns
Ready for review

主要语言
Python
星标
361
派生
296
PR 合并指标
30 天内没有已合并 PR

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

openml/openml-python 的其他 Issue

查看 openml/openml-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。