Skip to content

Commit

Permalink
fix: Fix aiplatform.init bug by replacing experiment_name with experi…
Browse files Browse the repository at this point in the history
…ment

PiperOrigin-RevId: 542988570
  • Loading branch information
vertex-sdk-bot authored and copybara-github committed Jun 23, 2023
1 parent c6cdd10 commit c60773a
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def autologging_with_auto_run_creation_sample(
location: str,
):
aiplatform.init(
experiment_name=experiment_name,
experiment=experiment_name,
project=project,
location=location,
experiment_tensorboard=experiment_tensorboard,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def test_autologging_with_auto_run_creation_sample(mock_sdk_init, mock_autolog):
)

mock_sdk_init.assert_called_with(
experiment_name=constants.EXPERIMENT_NAME,
experiment=constants.EXPERIMENT_NAME,
project=constants.PROJECT,
location=constants.LOCATION,
experiment_tensorboard=constants.TENSORBOARD_NAME,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def autologging_with_manual_run_creation_sample(
location: str,
):
aiplatform.init(
experiment_name=experiment_name,
experiment=experiment_name,
project=project,
location=location,
experiment_tensorboard=experiment_tensorboard,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def test_autologging_with_manual_run_creation_sample(
)

mock_sdk_init.assert_called_with(
experiment_name=constants.EXPERIMENT_NAME,
experiment=constants.EXPERIMENT_NAME,
project=constants.PROJECT,
location=constants.LOCATION,
experiment_tensorboard=constants.TENSORBOARD_NAME,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def create_experiment_run_sample(
project: str,
location: str,
):
aiplatform.init(experiment_name=experiment_name, project=project, location=location)
aiplatform.init(experiment=experiment_name, project=project, location=location)

aiplatform.start_run(run=run_name, tensorboard=experiment_run_tensorboard)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def test_create_experiment_run_sample(mock_sdk_init, mock_start_run):
)

mock_sdk_init.assert_called_with(
experiment_name=constants.EXPERIMENT_NAME,
experiment=constants.EXPERIMENT_NAME,
project=constants.PROJECT,
location=constants.LOCATION,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def end_experiment_run_sample(
project: str,
location: str,
):
aiplatform.init(experiment_name=experiment_name, project=project, location=location)
aiplatform.init(experiment=experiment_name, project=project, location=location)

aiplatform.start_run(run=run_name, resume=True)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def test_end_experiment_run_sample(mock_sdk_init, mock_start_run, mock_end_run):
)

mock_sdk_init.assert_called_with(
experiment_name=constants.EXPERIMENT_NAME,
experiment=constants.EXPERIMENT_NAME,
project=constants.PROJECT,
location=constants.LOCATION,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def log_time_series_metrics_sample(
project: str,
location: str,
):
aiplatform.init(experiment_name=experiment_name, project=project, location=location)
aiplatform.init(experiment=experiment_name, project=project, location=location)

aiplatform.start_run(run_name=run_name, resume=True)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def resume_experiment_run_sample(
project: str,
location: str,
):
aiplatform.init(experiment_name=experiment_name, project=project, location=location)
aiplatform.init(experiment=experiment_name, project=project, location=location)

aiplatform.start_run(run=run_name, resume=True)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def test_resume_experiment_run_sample(mock_sdk_init, mock_start_run):
)

mock_sdk_init.assert_called_with(
experiment_name=constants.EXPERIMENT_NAME,
experiment=constants.EXPERIMENT_NAME,
project=constants.PROJECT,
location=constants.LOCATION,
)
Expand Down

0 comments on commit c60773a

Please sign in to comment.