-
Notifications
You must be signed in to change notification settings - Fork 48
feat: add ml.llm.Claude3TextGenerator model #901
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
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
@@ -54,6 +54,13 @@ | |||
_GEMINI_1P5_PRO_FLASH_PREVIEW_ENDPOINT, | |||
) | |||
|
|||
_CLAUDE_3_SONNET_ENDPOINT = "claude-3-sonnet" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add all BQML-supported models?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Leaving tests to be added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I thought you were going to add tests in this PR itself. Are you going to send another PR for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. need to setup the connection for other regions.
(https://cloud.google.com/products#product-launch-stages). | ||
|
||
Args: | ||
model_name (str, Default to "claude-3-sonnet"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nit] "Defaults to ..."?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use "Default to" in all the APIs... Keeping it for now.
|
||
@log_adapter.class_logger | ||
class Claude3TextGenerator(base.BaseEstimator): | ||
"""Claude3 text generator LLM model. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like "Consumer Procurement Entitlement Manager Identity and Access Management (IAM) role" is an additional requirement https://cloud.google.com/vertex-ai/generative-ai/docs/partner-models/use-partner-models#set-permissions, we should document this in the class docstring and after the release in the reference docs https://cloud.google.com/bigquery/docs/use-bigquery-dataframes#remote-models
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
@@ -145,6 +145,16 @@ def session() -> Generator[bigframes.Session, None, None]: | |||
session.close() # close generated session at cleanup time | |||
|
|||
|
|||
@pytest.fixture(scope="session") | |||
def session_us_east5() -> Generator[bigframes.Session, None, None]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did we use it anywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
forgot to remove in this PR, but will use in PR of adding tests.
@@ -54,6 +54,13 @@ | |||
_GEMINI_1P5_PRO_FLASH_PREVIEW_ENDPOINT, | |||
) | |||
|
|||
_CLAUDE_3_SONNET_ENDPOINT = "claude-3-sonnet" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I thought you were going to add tests in this PR itself. Are you going to send another PR for this?
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes b/359901494 🦕