From 0a4d772aacc8b100aac6b0c7810296dd0a3e6692 Mon Sep 17 00:00:00 2001 From: A Vertex SDK engineer Date: Mon, 11 Dec 2023 10:22:17 -0800 Subject: [PATCH] docs: Add default value to optional field parameter_values PiperOrigin-RevId: 589865023 --- .../log_pipeline_job_to_experiment_sample.py | 4 ++-- .../log_pipeline_job_to_experiment_sample_test.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/samples/model-builder/experiment_tracking/log_pipeline_job_to_experiment_sample.py b/samples/model-builder/experiment_tracking/log_pipeline_job_to_experiment_sample.py index 495f9c2581..9c1effa1bb 100644 --- a/samples/model-builder/experiment_tracking/log_pipeline_job_to_experiment_sample.py +++ b/samples/model-builder/experiment_tracking/log_pipeline_job_to_experiment_sample.py @@ -1,4 +1,4 @@ -# Copyright 2022 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -23,9 +23,9 @@ def log_pipeline_job_to_experiment_sample( pipeline_job_display_name: str, template_path: str, pipeline_root: str, - parameter_values: Optional[Dict[str, Any]], project: str, location: str, + parameter_values: Optional[Dict[str, Any]] = None, ): aiplatform.init(project=project, location=location) diff --git a/samples/model-builder/experiment_tracking/log_pipeline_job_to_experiment_sample_test.py b/samples/model-builder/experiment_tracking/log_pipeline_job_to_experiment_sample_test.py index f826d1ca1e..e365b972fd 100644 --- a/samples/model-builder/experiment_tracking/log_pipeline_job_to_experiment_sample_test.py +++ b/samples/model-builder/experiment_tracking/log_pipeline_job_to_experiment_sample_test.py @@ -1,4 +1,4 @@ -# Copyright 2022 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -25,9 +25,9 @@ def test_log_pipeline_job_sample( pipeline_job_display_name=constants.DISPLAY_NAME, template_path=constants.TEMPLATE_PATH, pipeline_root=constants.STAGING_BUCKET, - parameter_values=constants.PARAMS, project=constants.PROJECT, location=constants.LOCATION, + parameter_values=constants.PARAMS, ) mock_sdk_init.assert_called_with(