Skip to content

feat(bigframes): support output_mode for ai.classify#17097

Merged
sycai merged 3 commits into
mainfrom
sycai_ai_classify_output_mode
May 14, 2026
Merged

feat(bigframes): support output_mode for ai.classify#17097
sycai merged 3 commits into
mainfrom
sycai_ai_classify_output_mode

Conversation

@sycai
Copy link
Copy Markdown
Contributor

@sycai sycai commented May 13, 2026

Fixes b/491582856 🦕

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds support for multi-label classification to the classify AI operation by introducing an output_mode parameter and updating example handling to support lists of strings. Review feedback highlights that the logic for determining the output data type is currently too broad, as it returns an array type whenever output_mode is specified, rather than specifically when it is set to "multi". It is also recommended to update the docstring to accurately reflect that arrays are only returned in "multi" mode.

Comment thread packages/bigframes/bigframes/operations/ai_ops.py
Comment thread packages/bigframes/bigframes/bigquery/_operations/ai.py
@sycai sycai force-pushed the sycai_ai_classify_output_mode branch from fce5766 to 833e85a Compare May 13, 2026 21:42
@sycai sycai requested review from TrevorBergeron and tswast May 13, 2026 22:46
@sycai sycai marked this pull request as ready for review May 13, 2026 22:46
@sycai sycai requested review from a team as code owners May 13, 2026 22:46
@sycai sycai requested a review from shuoweil May 14, 2026 21:18
@sycai sycai merged commit 098c35c into main May 14, 2026
31 checks passed
@sycai sycai deleted the sycai_ai_classify_output_mode branch May 14, 2026 21:31
nidhiii-27 pushed a commit that referenced this pull request May 18, 2026
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.

2 participants