-
Notifications
You must be signed in to change notification settings - Fork 15.8k
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
partner(google-vertex-ai): Add Custom User Agent to Vertex AI SDK #17043
Conversation
- For API metrics collection - Followup to langchain-ai#12168 NOTE: Before Merging, Update `raise_vertex_import_error(minimum_expected_version: str = "1.40.0")` to the actual version once the SDK is updated. - https://pypi.org/project/google-cloud-aiplatform/
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
- TODO: Undo this change
- Reverted minimum version
63c91e5
to
5fa033f
Compare
- Remove try/except from community vertexai.py
…lt version of `0.0.0` in case of failure. - This is needed for internal queries to work as expected.
cc @lkuligin |
@@ -80,6 +94,9 @@ def init_vertexai( | |||
credentials=credentials, | |||
) | |||
|
|||
_, user_agent = _get_user_agent(module) | |||
initializer.global_config.append_user_agent(user_agent) |
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.
getting mypy errors that this append_user_agent
function doesn't exist on _Config
. Also causes the tests to fail, so seems like a real problem even after updating packages.
@holtskinner @lkuligin let me know how's best to fix!
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.
Oh I'm silly - looks like it'll be in 42 when ready. Will convert this to a draft PR for now!
@lkuligin not sure if this one made it over to https://github.com/langchain-ai/langchain-google yet - should this be re-opened over there? |
I think that langchain-ai/langchain-google#31 covers everything |
google-cloud-aiplatform
to be updated in PR feat: Add custom tool context manager for telemetry googleapis/python-aiplatform#3261raise_vertex_import_error(minimum_expected_version: str = "1.38.0")
to the actual version once the SDK is updated.Tested locally successfully when installing from source PR.
DO NOT MERGE - Until googleapis/python-aiplatform#3261 is Released and
minimum_expected_version
is updated to correct version.