Skip to content

Conversation

jaycee-li
Copy link
Contributor

@jaycee-li jaycee-li commented Aug 23, 2022

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:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

This PR adds the feature that was requested in b/233694218

@jaycee-li jaycee-li requested a review from a team as a code owner August 23, 2022 00:28
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: vertex-ai Issues related to the googleapis/python-aiplatform API. labels Aug 23, 2022
@nayaknishant nayaknishant self-requested a review August 25, 2022 18:01
@nayaknishant
Copy link
Contributor

Hey @jaycee-li is it necessary to have the Namespace class? I'm wondering what's the easiest way for users to understand how to go about making/using filters.

@jaycee-li
Copy link
Contributor Author

Hey @jaycee-li is it necessary to have the Namespace class? I'm wondering what's the easiest way for users to understand how to go about making/using filters.

@nayaknishant Yeah I thought about it. But the filter message is defined in gapic, I didn't find a way to make the structure simpler in SDK. If not using Namespace class, users will need to construct the filter (in dictionary or list) by themselves. I feel like this Namespace class can help users better understand the filter message.

@nayaknishant
Copy link
Contributor

Sounds good. To emphasize how Namespace is used can we change the example in the comment to For example, [Namespace("color", ["red"], []), Namespace("shape", [], ["squared"])] will match datapoints that satisfy "red color" and not include datapoints that are "squared", or something like that (showing how both allow_tokens and deny_tokens are used).

@jaycee-li
Copy link
Contributor Author

Sounds good. To emphasize how Namespace is used can we change the example in the comment to For example, [Namespace("color", ["red"], []), Namespace("shape", [], ["squared"])] will match datapoints that satisfy "red color" and not include datapoints that are "squared", or something like that (showing how both allow_tokens and deny_tokens are used).

@nayaknishant Updated.

@jaycee-li jaycee-li merged commit d591d3e into googleapis:main Aug 26, 2022
@jaycee-li jaycee-li deleted the matching-engine-filter branch August 26, 2022 02:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: vertex-ai Issues related to the googleapis/python-aiplatform API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants