From 477d9e6ad2ec0f6fe2db581da36e2b9964ec9836 Mon Sep 17 00:00:00 2001 From: Morgan Du Date: Fri, 22 Apr 2022 10:41:02 -0700 Subject: [PATCH] feat: allow creating featurestore without online node --- google/cloud/aiplatform/featurestore/featurestore.py | 4 ++-- tests/system/aiplatform/test_featurestore.py | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/google/cloud/aiplatform/featurestore/featurestore.py b/google/cloud/aiplatform/featurestore/featurestore.py index 44e1150712..3bb5d44b80 100644 --- a/google/cloud/aiplatform/featurestore/featurestore.py +++ b/google/cloud/aiplatform/featurestore/featurestore.py @@ -447,7 +447,7 @@ def create( The value must be unique within the project and location. online_store_fixed_node_count (int): Optional. Config for online serving resources. - When not specified, default node count is 1. The + When not specified, no fixed node count for online serving. The number of nodes will not scale automatically but can be scaled manually by providing different values when updating. @@ -496,7 +496,7 @@ def create( """ gapic_featurestore = gca_featurestore.Featurestore( online_serving_config=gca_featurestore.Featurestore.OnlineServingConfig( - fixed_node_count=online_store_fixed_node_count or 1 + fixed_node_count=online_store_fixed_node_count ) ) diff --git a/tests/system/aiplatform/test_featurestore.py b/tests/system/aiplatform/test_featurestore.py index d6491c24b6..a7abf3ce84 100644 --- a/tests/system/aiplatform/test_featurestore.py +++ b/tests/system/aiplatform/test_featurestore.py @@ -65,7 +65,9 @@ def test_create_get_list_featurestore(self, shared_state): featurestore_id = self._make_display_name(key=_TEST_FEATURESTORE_ID).replace( "-", "_" )[:60] - featurestore = aiplatform.Featurestore.create(featurestore_id=featurestore_id) + featurestore = aiplatform.Featurestore.create( + featurestore_id=featurestore_id, online_store_fixed_node_count=1 + ) shared_state["resources"] = [featurestore] shared_state["featurestore"] = featurestore