Skip to content
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

[Python] Vertex AI Feature Store enrichment handler #30388

Merged
merged 10 commits into from
Mar 6, 2024

Conversation

riteshghorse
Copy link
Contributor

@riteshghorse riteshghorse commented Feb 22, 2024

This PR adds support for Vertex AI Feature Store with Bigtable online serving and legacy feature store.
It builds on top of the #30001 that added the handler for Bigtable.

Example:

handler = VertexAIFeatureStoreEnrichmentHandler(project=PROJECT_ID,
                                                location=STORE_INSTANCE_REGION,
                                                api_endpoint=ENDPOINT,
                                                feature_store_name=STORE_NAME,
                                                feature_view_name=VIEW_NAME,
                                                row_key=KEY_IN_INPUT_ROW_WITH_UNIQUE_ID,                                                                                     
                                                )

with beam.Pipeline() as p:
  _ = (p
       | "Create Data" >> beam.Create(data)
       |  ... transforms ...
       | "Enrich Data" >> Enrichment(handler)
       | ... transforms ...
      )

The Optimized Serving and Vector Retrieval are in preview launch from Vertex AI which uses the aiplatform_v1beta version of library. Once these are launched from beta, I'll update the client to use that library.

Nothing should change for the user-interface but just the internal of handler where we set up and call the client. I tried this with beta library and it works but I would prefer to not depend on beta library at this point. We will need a different handler for Vector Retrieval case but Optimized Serving can be covered with the existing VertexAIFeatureStoreEnrichmentHandler.

Part of #30386


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests
Go tests

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

@riteshghorse riteshghorse marked this pull request as ready for review February 23, 2024 17:11
@riteshghorse riteshghorse marked this pull request as draft February 23, 2024 17:17
@riteshghorse riteshghorse marked this pull request as ready for review February 23, 2024 17:24
@riteshghorse riteshghorse marked this pull request as draft February 23, 2024 17:30
@github-actions github-actions bot added the build label Feb 23, 2024
@riteshghorse riteshghorse marked this pull request as ready for review February 23, 2024 20:44
@riteshghorse riteshghorse changed the title Vertex AI Feature store enrichment handler [Python] Vertex AI Feature Store enrichment handler Feb 23, 2024
Copy link
Contributor

Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment assign set of reviewers

@riteshghorse
Copy link
Contributor Author

assign set of reviewers

Copy link
Contributor

Assigning reviewers. If you would like to opt out of this review, comment assign to next reviewer:

R: @AnandInguva for label python.
R: @Abacn for label build.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

@riteshghorse
Copy link
Contributor Author

Failing tests are unrelated to this change
image

Looking at the other test failures in the meantime

@riteshghorse
Copy link
Contributor Author

riteshghorse commented Feb 26, 2024

The issue with Python coverage is due to mpmath new version - #30418

Postcommits failed because of unrelated BigQuery IO tests - #30437

@riteshghorse
Copy link
Contributor Author

riteshghorse commented Feb 28, 2024

R: @damccorm / @tvalentyn (since Anand and Jack are OOO). Let's get it in for 2.55.0

Copy link
Contributor

@damccorm damccorm left a comment

Choose a reason for hiding this comment

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

Looks like test failure is unrelated, so I'm good to merge as long as we have an issue to track the open comment

@github-actions github-actions bot added build and removed build labels Mar 6, 2024
@riteshghorse riteshghorse added this to the 2.55.0 Release milestone Mar 6, 2024
@github-actions github-actions bot added build and removed build labels Mar 6, 2024
@github-actions github-actions bot added build and removed build labels Mar 6, 2024
@riteshghorse
Copy link
Contributor Author

Unrelated failure/flake. Merging this.

@riteshghorse riteshghorse merged commit 314bd72 into apache:master Mar 6, 2024
71 of 73 checks passed
@riteshghorse riteshghorse deleted the vfs-enrichment branch March 6, 2024 18:23
MelodyShen pushed a commit to MelodyShen/beam that referenced this pull request Mar 20, 2024
* vertex ai v1

* vertex ai base

* bigtable and legacy support

* correct pydoc, project name

* clear exception message, refactor, unittests

* add main

* drop postcommit file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants