Skip to content

Commit

Permalink
chore: Fix lint for vector search samples
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 691209812
  • Loading branch information
vertex-sdk-bot authored and copybara-github committed Oct 29, 2024
1 parent a89be3d commit 23cac8a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,4 +133,3 @@ def vector_search_find_neighbors_jwt(
return resp

# [END aiplatform_sdk_vector_search_find_neighbors_jwt_sample]

Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,3 @@ def vector_search_match_jwt(
return resp

# [END aiplatform_sdk_vector_search_match_jwt_sample]

Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,3 @@ def vector_search_read_index_datapoints_jwt(
return resp

# [END aiplatform_sdk_vector_search_read_index_datapoints_jwt_sample]

Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def test_vector_search_read_index_datapoints_jwt_sample(
mock_index_endpoint_init,
mock_index_endpoint_read_index_datapoints,
):
vector_search_read_index_datapoints_sample.vector_search_read_index_datapoints_jwt(
vector_search_read_index_datapoints_sample.vector_search_read_index_datapoints_jwt(
project=constants.PROJECT,
location=constants.LOCATION,
index_endpoint_name=constants.VECTOR_SEARCH_INDEX_ENDPOINT,
Expand All @@ -30,17 +30,18 @@ def test_vector_search_read_index_datapoints_jwt_sample(
signed_jwt=constants.VECTOR_SEARCH_PRIVATE_ENDPOINT_SIGNED_JWT,
)

# Check client initialization
mock_sdk_init.assert_called_with(
# Check client initialization
mock_sdk_init.assert_called_with(
project=constants.PROJECT, location=constants.LOCATION
)

# Check index endpoint initialization with right index endpoint name
mock_index_endpoint_init.assert_called_with(
index_endpoint_name=constants.VECTOR_SEARCH_INDEX_ENDPOINT)
# Check index endpoint initialization with right index endpoint name
mock_index_endpoint_init.assert_called_with(
index_endpoint_name=constants.VECTOR_SEARCH_INDEX_ENDPOINT
)

# Check index_endpoint.match is called with right params.
mock_index_endpoint_read_index_datapoints.assert_called_with(
# Check index_endpoint.match is called with right params.
mock_index_endpoint_read_index_datapoints.assert_called_with(
deployed_index_id=constants.VECTOR_SEARCH_DEPLOYED_INDEX_ID,
ids=constants.VECTOR_SEARCH_INDEX_DATAPOINT_IDS,
signed_jwt=constants.VECTOR_SEARCH_PRIVATE_ENDPOINT_SIGNED_JWT,
Expand Down

0 comments on commit 23cac8a

Please sign in to comment.