@@ -252,7 +252,7 @@ def fg_eq(
252252def test_init (feature_group_name , get_fg_mock ):
253253 aiplatform .init (project = _TEST_PROJECT , location = _TEST_LOCATION )
254254
255- fg = FeatureGroup (feature_group_name )
255+ fg = FeatureGroup (name = feature_group_name )
256256
257257 get_fg_mock .assert_called_once_with (
258258 name = _TEST_FG1_PATH ,
@@ -415,7 +415,7 @@ def test_list(list_fg_mock):
415415def test_delete (delete_fg_mock , get_fg_mock , fg_logger_mock , force , sync ):
416416 aiplatform .init (project = _TEST_PROJECT , location = _TEST_LOCATION )
417417
418- fg = FeatureGroup (_TEST_FG1_ID )
418+ fg = FeatureGroup (name = _TEST_FG1_ID )
419419 fg .delete (force = force , sync = sync )
420420
421421 if not sync :
@@ -444,7 +444,7 @@ def test_delete(delete_fg_mock, get_fg_mock, fg_logger_mock, force, sync):
444444def test_get_feature (get_fg_mock , get_feature_mock ):
445445 aiplatform .init (project = _TEST_PROJECT , location = _TEST_LOCATION )
446446
447- fg = FeatureGroup (_TEST_FG1_ID )
447+ fg = FeatureGroup (name = _TEST_FG1_ID )
448448 feature = fg .get_feature (_TEST_FG1_F1_ID )
449449
450450 get_feature_mock .assert_called_once_with (
@@ -469,7 +469,7 @@ def test_get_feature_with_latest_stats_count(
469469):
470470 aiplatform .init (project = _TEST_PROJECT , location = _TEST_LOCATION )
471471
472- fg = FeatureGroup (_TEST_FG1_ID )
472+ fg = FeatureGroup (name = _TEST_FG1_ID )
473473 feature = fg .get_feature (_TEST_FG1_F1_ID , latest_stats_count = 1 )
474474
475475 get_feature_with_stats_and_anomalies_mock .assert_called_once_with (
@@ -503,7 +503,7 @@ def test_get_feature_credentials_set_in_init(mock_base_instantiate_client):
503503 mock_base_instantiate_client .return_value .get_feature_group .return_value = _TEST_FG1
504504 mock_base_instantiate_client .return_value .get_feature .return_value = _TEST_FG1_F1
505505
506- fg = FeatureGroup (_TEST_FG1_ID )
506+ fg = FeatureGroup (name = _TEST_FG1_ID )
507507 mock_base_instantiate_client .assert_called_with (
508508 location = _TEST_LOCATION ,
509509 credentials = credentials ,
@@ -538,7 +538,7 @@ def test_get_feature_from_feature_group_with_explicit_credentials(
538538 mock_base_instantiate_client .return_value .get_feature .return_value = _TEST_FG1_F1
539539
540540 credentials = mock .MagicMock (spec = auth_credentials .Credentials )
541- fg = FeatureGroup (_TEST_FG1_ID , credentials = credentials )
541+ fg = FeatureGroup (name = _TEST_FG1_ID , credentials = credentials )
542542 mock_base_instantiate_client .assert_called_with (
543543 location = _TEST_LOCATION ,
544544 credentials = credentials ,
@@ -576,7 +576,7 @@ def test_get_feature_from_feature_group_with_explicit_credentials_overrides_init
576576 mock_base_instantiate_client .return_value .get_feature .return_value = _TEST_FG1_F1
577577
578578 credentials = mock .MagicMock (spec = auth_credentials .Credentials )
579- fg = FeatureGroup (_TEST_FG1_ID , credentials = credentials )
579+ fg = FeatureGroup (name = _TEST_FG1_ID , credentials = credentials )
580580 mock_base_instantiate_client .assert_called_with (
581581 location = _TEST_LOCATION ,
582582 credentials = credentials ,
@@ -608,7 +608,7 @@ def test_get_feature_with_explicit_credentials(mock_base_instantiate_client):
608608 mock_base_instantiate_client .return_value .get_feature_group .return_value = _TEST_FG1
609609 mock_base_instantiate_client .return_value .get_feature .return_value = _TEST_FG1_F1
610610
611- fg = FeatureGroup (_TEST_FG1_ID )
611+ fg = FeatureGroup (name = _TEST_FG1_ID )
612612 mock_base_instantiate_client .assert_called_with (
613613 location = _TEST_LOCATION ,
614614 credentials = mock .ANY ,
@@ -646,7 +646,7 @@ def test_get_feature_with_explicit_credentials_overrides_init_credentials(
646646 mock_base_instantiate_client .return_value .get_feature_group .return_value = _TEST_FG1
647647 mock_base_instantiate_client .return_value .get_feature .return_value = _TEST_FG1_F1
648648
649- fg = FeatureGroup (_TEST_FG1_ID )
649+ fg = FeatureGroup (name = _TEST_FG1_ID )
650650 mock_base_instantiate_client .assert_called_with (
651651 location = _TEST_LOCATION ,
652652 credentials = init_credentials ,
@@ -682,7 +682,7 @@ def test_get_feature_with_explicit_credentials_overrides_feature_group_credentia
682682 mock_base_instantiate_client .return_value .get_feature .return_value = _TEST_FG1_F1
683683
684684 feature_group_credentials = mock .MagicMock (spec = auth_credentials .Credentials )
685- fg = FeatureGroup (_TEST_FG1_ID , credentials = feature_group_credentials )
685+ fg = FeatureGroup (name = _TEST_FG1_ID , credentials = feature_group_credentials )
686686 mock_base_instantiate_client .assert_called_with (
687687 location = _TEST_LOCATION ,
688688 credentials = feature_group_credentials ,
@@ -721,7 +721,7 @@ def test_get_feature_with_explicit_credentials_overrides_init_and_feature_group_
721721 mock_base_instantiate_client .return_value .get_feature .return_value = _TEST_FG1_F1
722722
723723 feature_group_credentials = mock .MagicMock (spec = auth_credentials .Credentials )
724- fg = FeatureGroup (_TEST_FG1_ID , credentials = feature_group_credentials )
724+ fg = FeatureGroup (name = _TEST_FG1_ID , credentials = feature_group_credentials )
725725 mock_base_instantiate_client .assert_called_with (
726726 location = _TEST_LOCATION ,
727727 credentials = feature_group_credentials ,
@@ -760,7 +760,7 @@ def test_create_feature(
760760):
761761 aiplatform .init (project = _TEST_PROJECT , location = _TEST_LOCATION )
762762
763- fg = FeatureGroup (_TEST_FG1_ID )
763+ fg = FeatureGroup (name = _TEST_FG1_ID )
764764 feature = fg .create_feature (
765765 _TEST_FG1_F1_ID ,
766766 description = _TEST_FG1_F1_DESCRIPTION ,
@@ -826,7 +826,7 @@ def test_create_feature_with_version_feature_column(
826826):
827827 aiplatform .init (project = _TEST_PROJECT , location = _TEST_LOCATION )
828828
829- fg = FeatureGroup (_TEST_FG1_ID )
829+ fg = FeatureGroup (name = _TEST_FG1_ID )
830830 feature = fg .create_feature (
831831 _TEST_FG1_F2_ID ,
832832 version_column_name = _TEST_FG1_F2_VERSION_COLUMN_NAME ,
@@ -886,7 +886,7 @@ def test_create_feature_with_version_feature_column(
886886def test_list_features (get_fg_mock , list_features_mock ):
887887 aiplatform .init (project = _TEST_PROJECT , location = _TEST_LOCATION )
888888
889- features = FeatureGroup (_TEST_FG1_ID ).list_features ()
889+ features = FeatureGroup (name = _TEST_FG1_ID ).list_features ()
890890
891891 list_features_mock .assert_called_once_with (request = {"parent" : _TEST_FG1_PATH })
892892 assert len (features ) == len (_TEST_FG1_FEATURE_LIST )
@@ -923,7 +923,7 @@ def test_create_feature_monitor(
923923):
924924 aiplatform .init (project = _TEST_PROJECT , location = _TEST_LOCATION )
925925
926- fg = FeatureGroup (_TEST_FG1_ID )
926+ fg = FeatureGroup (name = _TEST_FG1_ID )
927927 feature_monitor = fg .create_feature_monitor (
928928 _TEST_FG1_FM1_ID ,
929929 description = _TEST_FG1_FM1_DESCRIPTION ,
@@ -997,7 +997,7 @@ def test_list_feature_monitors(
997997):
998998 aiplatform .init (project = _TEST_PROJECT , location = _TEST_LOCATION )
999999
1000- feature_monitors = FeatureGroup (_TEST_FG1_ID ).list_feature_monitors ()
1000+ feature_monitors = FeatureGroup (name = _TEST_FG1_ID ).list_feature_monitors ()
10011001
10021002 list_feature_monitors_mock .assert_called_once_with (
10031003 request = {"parent" : _TEST_FG1_PATH }
0 commit comments