diff --git a/samples/model-builder/model_registry/assign_aliases_model_version_sample.py b/samples/model-builder/model_registry/assign_aliases_model_version_sample.py index e9b1d3178e..38a1582c47 100644 --- a/samples/model-builder/model_registry/assign_aliases_model_version_sample.py +++ b/samples/model-builder/model_registry/assign_aliases_model_version_sample.py @@ -32,15 +32,15 @@ def assign_aliases_model_version_sample( model_id: The ID of the model. version_aliases: The version aliases to assign. version_id: The version ID of the model to assign the aliases to. - project: The project name. - location: The location name. + project: The project ID. + location: The region name. Returns None. """ # Initialize the client. aiplatform.init(project=project, location=location) - # Initialize the Model Registry resource with the ID 'model_id'.The parent_name of create method can be also + # Initialize the Model Registry resource with the ID 'model_id'.The parent_name of the Model resource can be also # 'projects//locations//models/' model_registry = aiplatform.models.ModelRegistry(model=model_id) diff --git a/samples/model-builder/model_registry/create_aliased_model_sample.py b/samples/model-builder/model_registry/create_aliased_model_sample.py index f66b2dd6f9..0ece6153aa 100644 --- a/samples/model-builder/model_registry/create_aliased_model_sample.py +++ b/samples/model-builder/model_registry/create_aliased_model_sample.py @@ -25,8 +25,8 @@ def create_aliased_model_sample( Args: model_id: The ID of the model to initialize. Parent resource name of the model is also accepted. version_id: The version ID or version alias of the model to initialize. - project: The project. - location: The location. + project: The project ID. + location: The region name. Returns: Model resource. """ diff --git a/samples/model-builder/model_registry/create_default_model_sample.py b/samples/model-builder/model_registry/create_default_model_sample.py index 9228e03a6a..be5db3d781 100644 --- a/samples/model-builder/model_registry/create_default_model_sample.py +++ b/samples/model-builder/model_registry/create_default_model_sample.py @@ -22,15 +22,15 @@ def create_default_model_sample(model_id: str, project: str, location: str): Initialize a Model resource to represent an existing model version with alias 'default'. Args: model_id: The ID of the model to initialize. Parent resource name of the model is also accepted. - project: The project. - location: The location. + project: The project ID. + location: The region name. Returns: Model resource. """ # Initialize the client. aiplatform.init(project=project, location=location) - # Initialize the Model resource with the ID 'model_id'. The parent_name of create method can be also + # Initialize the Model resource with the ID 'model_id'. The parent_name of the Model resource can be also # 'projects//locations//models/' default_model = aiplatform.Model(model_name=model_id) diff --git a/samples/model-builder/model_registry/create_model_registry_sample.py b/samples/model-builder/model_registry/create_model_registry_sample.py index 8b853eaff5..e2fe4634a4 100644 --- a/samples/model-builder/model_registry/create_model_registry_sample.py +++ b/samples/model-builder/model_registry/create_model_registry_sample.py @@ -22,8 +22,8 @@ def create_model_registry_sample(model_id: str, project: str, location: str): Create a ModelRegistry resource associated to model_id Args: model_id: The ID of the model. - project: The project name. - location: The location name. + project: The project ID. + location: The region name. Returns: ModelRegistry resource. """ @@ -31,7 +31,7 @@ def create_model_registry_sample(model_id: str, project: str, location: str): # Initialize the client. aiplatform.init(project=project, location=location) - # Initialize the Model Registry resource with the ID 'model_id'.The parent_name of create method can be also + # Initialize the Model Registry resource with the ID 'model_id'.The parent_name of Model resource can be also # 'projects//locations//models/' model_registry = aiplatform.models.ModelRegistry(model=model_id) diff --git a/samples/model-builder/model_registry/delete_aliases_model_version_sample.py b/samples/model-builder/model_registry/delete_aliases_model_version_sample.py index 6a271d096e..d53d6282bc 100644 --- a/samples/model-builder/model_registry/delete_aliases_model_version_sample.py +++ b/samples/model-builder/model_registry/delete_aliases_model_version_sample.py @@ -32,15 +32,15 @@ def delete_aliases_model_version_sample( model_id: The ID of the model. version_aliases: The version aliases to assign. version_id: The version ID of the model to assign the aliases to. - project: The project name. - location: The location name. + project: The project ID. + location: The region name. Returns None. """ # Initialize the client. aiplatform.init(project=project, location=location) - # Initialize the Model Registry resource with the ID 'model_id'.The parent_name of create method can be also + # Initialize the Model Registry resource with the ID 'model_id'.The parent_name of Model resource can be also # 'projects//locations//models/' model_registry = aiplatform.models.ModelRegistry(model=model_id) diff --git a/samples/model-builder/model_registry/delete_model_sample.py b/samples/model-builder/model_registry/delete_model_sample.py index ce43255bb1..5ad242a4fb 100644 --- a/samples/model-builder/model_registry/delete_model_sample.py +++ b/samples/model-builder/model_registry/delete_model_sample.py @@ -23,14 +23,14 @@ def delete_model_sample(model_id: str, project: str, location: str): Args: model_id: The ID of the model to delete. Parent resource name of the model is also accepted. project: The project. - location: The location. + location: The region name. Returns None. """ # Initialize the client. aiplatform.init(project=project, location=location) - # Get the model with the ID 'model_id'. The parent_name of delete method can be also + # Get the model with the ID 'model_id'. The parent_name of Model resource can be also # 'projects//locations//models/' model = aiplatform.Model(model_name=model_id) diff --git a/samples/model-builder/model_registry/delete_model_version_sample.py b/samples/model-builder/model_registry/delete_model_version_sample.py index 1cd857578a..e8a8dcb3bd 100644 --- a/samples/model-builder/model_registry/delete_model_version_sample.py +++ b/samples/model-builder/model_registry/delete_model_version_sample.py @@ -25,15 +25,15 @@ def delete_model_version_sample( Args: model_id: The ID of the model to delete. Parent resource name of the model is also accepted. version_id: The version ID or version alias of the model to delete. - project: The project. - location: The location. + project: The project ID. + location: The region name. Returns None. """ # Initialize the client. aiplatform.init(project=project, location=location) - # Initialize the Model Registry resource with the ID 'model_id'.The parent_name of create method can be also + # Initialize the Model Registry resource with the ID 'model_id'.The parent_name of Model resource can be also # 'projects//locations//models/' model_registry = aiplatform.models.ModelRegistry(model=model_id) diff --git a/samples/model-builder/model_registry/get_model_version_info_sample.py b/samples/model-builder/model_registry/get_model_version_info_sample.py index 00c8e0ae17..7f5e5ee54b 100644 --- a/samples/model-builder/model_registry/get_model_version_info_sample.py +++ b/samples/model-builder/model_registry/get_model_version_info_sample.py @@ -25,8 +25,8 @@ def get_model_version_info_sample( Args: model_id: The ID of the model. version_id: The version ID of the model version. - project: The project name. - location: The location name. + project: The project ID. + location: The region name. Returns: VersionInfo resource. """ @@ -34,7 +34,7 @@ def get_model_version_info_sample( # Initialize the client. aiplatform.init(project=project, location=location) - # Initialize the Model Registry resource with the ID 'model_id'.The parent_name of create method can be also + # Initialize the Model Registry resource with the ID 'model_id'.The parent_name of Model resource can be also # 'projects//locations//models/' model_registry = aiplatform.models.ModelRegistry(model=model_id) diff --git a/samples/model-builder/model_registry/get_registered_model_version_sample.py b/samples/model-builder/model_registry/get_registered_model_version_sample.py index cda5fcdd63..efae592250 100644 --- a/samples/model-builder/model_registry/get_registered_model_version_sample.py +++ b/samples/model-builder/model_registry/get_registered_model_version_sample.py @@ -26,8 +26,8 @@ def get_registered_model_version_sample( Get a registered model version. Args: model_id: The ID of the model. Parent resource name of the model is also accepted. - project: The project. - location: The location. + project: The project ID. + location: The region name. version_id: The version ID of the model. Returns: Model resource. @@ -35,7 +35,7 @@ def get_registered_model_version_sample( # Initialize the client. aiplatform.init(project=project, location=location) - # Initialize the Model Registry resource with the ID 'model_id'. The parent_name of get method can be also + # Initialize the Model Registry resource with the ID 'model_id'. The parent_name of Model resource can be also # 'projects//locations//models/' model_registry = aiplatform.models.ModelRegistry(model=model_id) diff --git a/samples/model-builder/model_registry/list_model_versions_with_model_registry_sample.py b/samples/model-builder/model_registry/list_model_versions_with_model_registry_sample.py index dd4938ec7f..1b43c719ae 100644 --- a/samples/model-builder/model_registry/list_model_versions_with_model_registry_sample.py +++ b/samples/model-builder/model_registry/list_model_versions_with_model_registry_sample.py @@ -22,15 +22,15 @@ def list_model_versions_sample(model_id: str, project: str, location: str): List all model versions of a model. Args: model_id: The ID of the model to list. Parent resource name of the model is also accepted. - project: The project. - location: The location. + project: The project ID. + location: The region name. Returns: versions: List of model versions. """ # Initialize the client. aiplatform.init(project=project, location=location) - # Initialize the Model Registry resource with the ID 'model_id'.The parent_name of create method can be also + # Initialize the Model Registry resource with the ID 'model_id'.The parent_name of Model resource can be also # 'projects//locations//models/' model_registry = aiplatform.models.ModelRegistry(model=model_id) diff --git a/samples/model-builder/model_registry/upload_new_aliased_model_version_sample.py b/samples/model-builder/model_registry/upload_new_aliased_model_version_sample.py index 3a6d4d9711..f4a039a6bd 100644 --- a/samples/model-builder/model_registry/upload_new_aliased_model_version_sample.py +++ b/samples/model-builder/model_registry/upload_new_aliased_model_version_sample.py @@ -38,16 +38,16 @@ def upload_new_aliased_model_version_sample( is_default_version: Whether this version is the default version of the model. version_aliases: The aliases of the model version. version_description: The description of the model version. - project: The project. - location: The location. + project: The project ID. + location: The region name. Returns: The new version of the model. """ # Initialize the client. aiplatform.init(project=project, location=location) - # Upload a new aliased version of the Model resource with the ID 'model_id'. The parent_name of upload method can - # be also 'projects//locations//models/' + # Upload a new aliased version of the Model resource with the ID 'model_id'. The parent_name of Model resource can be also + # 'projects//locations//models/' model = aiplatform.Model.upload( artifact_uri=artifact_uri, serving_container_image=serving_container_image, diff --git a/samples/model-builder/model_registry/upload_new_aliased_model_version_sample_test.py b/samples/model-builder/model_registry/upload_new_aliased_model_version_sample_test.py index e53082e7d7..56adbc8858 100644 --- a/samples/model-builder/model_registry/upload_new_aliased_model_version_sample_test.py +++ b/samples/model-builder/model_registry/upload_new_aliased_model_version_sample_test.py @@ -12,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. - import upload_new_aliased_model_version_sample import test_constants as constants diff --git a/samples/model-builder/model_registry/upload_new_default_model_version_sample.py b/samples/model-builder/model_registry/upload_new_default_model_version_sample.py index 31672b58ba..c038d7497c 100644 --- a/samples/model-builder/model_registry/upload_new_default_model_version_sample.py +++ b/samples/model-builder/model_registry/upload_new_default_model_version_sample.py @@ -30,8 +30,8 @@ def upload_new_default_model_version_sample( parent_name: The parent resource name of the existing model. artifact_uri: The URI of the model artifact to upload. serving_container_image: The name of the serving container image to use. - project: The project. - location: The location. + project: The project ID. + location: The region name. Returns: The new version of the model. @@ -39,8 +39,7 @@ def upload_new_default_model_version_sample( # Initialize the client. aiplatform.init(project=project, location=location) - # Upload a new default version of the Model resource with the ID 'model_id'. - # The parent_name of upload method can be also + # Upload a new default version of the Model resource with the ID 'model_id'. The parent_name of Model resource can be also # 'projects//locations//models/' model = aiplatform.Model.upload( artifact_uri=artifact_uri, diff --git a/samples/model-builder/model_registry/upload_new_default_model_version_sample_test.py b/samples/model-builder/model_registry/upload_new_default_model_version_sample_test.py index 06e092331f..847763d046 100644 --- a/samples/model-builder/model_registry/upload_new_default_model_version_sample_test.py +++ b/samples/model-builder/model_registry/upload_new_default_model_version_sample_test.py @@ -12,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. - import upload_new_default_model_version_sample import test_constants as constants diff --git a/samples/model-builder/model_registry/upload_new_model_version_using_custom_training_pipeline_sample.py b/samples/model-builder/model_registry/upload_new_model_version_using_custom_training_pipeline_sample.py index a5c4d28447..ce56546c54 100644 --- a/samples/model-builder/model_registry/upload_new_model_version_using_custom_training_pipeline_sample.py +++ b/samples/model-builder/model_registry/upload_new_model_version_using_custom_training_pipeline_sample.py @@ -54,8 +54,8 @@ def upload_new_model_version_using_custom_training_pipeline( model_version_aliases: The aliases of the model version to create. model_version_description: The description of the model version. is_default_version: Whether the model version is the default version. - project: The project. - location: The location. + project: The project ID. + location: The region name. Returns: The new version of the model. """ diff --git a/samples/model-builder/model_registry/upload_new_model_version_using_custom_training_pipeline_test.py b/samples/model-builder/model_registry/upload_new_model_version_using_custom_training_pipeline_test.py index 39882c1cc9..e4a6457f52 100644 --- a/samples/model-builder/model_registry/upload_new_model_version_using_custom_training_pipeline_test.py +++ b/samples/model-builder/model_registry/upload_new_model_version_using_custom_training_pipeline_test.py @@ -12,21 +12,19 @@ # See the License for the specific language governing permissions and # limitations under the License. - import upload_new_model_version_using_custom_training_pipeline_sample import test_constants as constants def test_upload_new_model_version_using_custom_training_pipeline_sample( - mock_sdk_init, - mock_tabular_dataset, - mock_get_tabular_dataset, - mock_get_custom_training_job, - mock_run_custom_training_job, - mock_upload_model, + mock_sdk_init, + mock_tabular_dataset, + mock_get_tabular_dataset, + mock_get_custom_training_job, + mock_run_custom_training_job, + mock_upload_model, ): - upload_new_model_version_using_custom_training_pipeline_sample.upload_new_model_version_using_custom_training_pipeline( display_name=constants.DISPLAY_NAME, script_path=constants.SCRIPT_PATH,