Thanks to visit codestin.com
Credit goes to github.com

Skip to content

docs: deprecate default model in TextEmbedddingGenerator, GeminiTextGenerator, and other bigframes.ml.llm classes #1570

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 16, 2025

Conversation

shuoweil
Copy link
Contributor

docs: add remove default model warning, default LLM model will be removed for Bigframes 3.0

@shuoweil shuoweil requested review from tswast and GarrettWu March 28, 2025 22:25
@shuoweil shuoweil self-assigned this Mar 28, 2025
@shuoweil shuoweil requested review from a team as code owners March 28, 2025 22:25
@product-auto-label product-auto-label bot added size: s Pull request size is small. api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. labels Mar 28, 2025
@shuoweil shuoweil removed request for tswast and GarrettWu March 29, 2025 04:52
@shuoweil shuoweil marked this pull request as draft March 29, 2025 04:52
@shuoweil shuoweil force-pushed the shuowei-add-default-model-warning branch from f6c59f4 to 1e9fd7a Compare March 31, 2025 22:16
@shuoweil shuoweil requested review from tswast and GarrettWu March 31, 2025 23:37
@shuoweil shuoweil marked this pull request as ready for review March 31, 2025 23:37
@shuoweil shuoweil force-pushed the shuowei-add-default-model-warning branch from 1e9fd7a to c72346a Compare April 1, 2025 17:41
@shuoweil shuoweil requested a review from shobsi April 1, 2025 20:14
@shuoweil shuoweil marked this pull request as draft April 1, 2025 22:14
@shuoweil shuoweil force-pushed the shuowei-add-default-model-warning branch from c72346a to 3c77d3c Compare April 8, 2025 03:23
@shuoweil shuoweil requested a review from tswast April 8, 2025 17:19
@shuoweil shuoweil marked this pull request as ready for review April 8, 2025 17:20
@shuoweil shuoweil force-pushed the shuowei-add-default-model-warning branch from 3c77d3c to 81cb659 Compare April 8, 2025 21:50
@shuoweil
Copy link
Contributor Author

shuoweil commented Apr 9, 2025

failing notebook is not relevant to this change, please help me with the review @tswast @shobsi @GarrettWu

@tswast tswast changed the title docs: add remove default model warning docs: deprecate default model in TextEmbedddingGenerator, GeminiTextGenerator, and other bigframes.ml.llm classes Apr 10, 2025
Copy link
Collaborator

@tswast tswast left a comment

Choose a reason for hiding this comment

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

FYI: I updated the PR title to reflect what we're doing in a way the user would understand.

@shuoweil shuoweil force-pushed the shuowei-add-default-model-warning branch from 81cb659 to b58fa9c Compare April 10, 2025 19:58
@product-auto-label product-auto-label bot added size: m Pull request size is medium. and removed size: s Pull request size is small. labels Apr 10, 2025
@shuoweil shuoweil requested a review from tswast April 10, 2025 20:17
Copy link
Collaborator

@tswast tswast left a comment

Choose a reason for hiding this comment

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

Looks good, thank you!

Let's make sure these code paths are covered by tests, such as by adding unit tests that check that the warning is issued at construction time.

For example:

def test_decomposition_mf_invalid_feedback_type_raises():
feedback_type = "explimp"
with pytest.raises(
ValueError,
match="Expected feedback_type to be `explicit` or `implicit`.",
):
decomposition.MatrixFactorization(
# Intentionally pass in the wrong type. This will fail if the user is using
# a type checker, but we can't assume that everyone is doing so, especially
# not in notebook environments.
num_factors=16,
feedback_type=feedback_type, # type: ignore
user_col="user_id",
item_col="item_col",
rating_col="rating_col",
l2_reg=9.83,
)

but in this case, use pytest.warns instead.

@shuoweil shuoweil force-pushed the shuowei-add-default-model-warning branch from b58fa9c to cb1b0c4 Compare April 15, 2025 21:25
@shuoweil shuoweil requested a review from tswast April 15, 2025 21:26
@shobsi
Copy link
Contributor

shobsi commented Apr 16, 2025

May I suggest the title:

chore: warn if default llm is used in bigframes.ml.llm classes

@shuoweil
Copy link
Contributor Author

chore: warn if default llm is used in bigframes.ml.llm classes

Thanks @shobsi for the suggestion. I believe both of the title looks great. Adding @tswast for discussion.

@tswast
Copy link
Collaborator

tswast commented Apr 16, 2025

@shobsi We don't want to use chore: because we want this to be in the changelog. chore: should be reserved for changes that don't affect user-facing behaviors like refactors and test infrastructure.

@shuoweil shuoweil merged commit 89ab33e into main Apr 16, 2025
24 checks passed
@shuoweil shuoweil deleted the shuowei-add-default-model-warning branch April 16, 2025 21:57
@shobsi
Copy link
Contributor

shobsi commented Apr 17, 2025

@shobsi We don't want to use chore: because we want this to be in the changelog. chore: should be reserved for changes that don't affect user-facing behaviors like refactors and test infrastructure.

Ack, feat: would make more sense, but the main point was to shorten the long title

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants