Skip to content

Commit

Permalink
fix: Make sure the models list is populated before indexing
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 577280946
  • Loading branch information
vertex-sdk-bot authored and Copybara-Service committed Oct 27, 2023
1 parent 7e09529 commit f1659e8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/system/aiplatform/test_experiments.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,10 @@ def test_log_model(self, shared_state):
run = aiplatform.ExperimentRun(
run_name=_RUN, experiment=self._experiment_name
)
experiment_model = run.get_experiment_models()[0]
experiment_model.delete()
experiment_models = run.get_experiment_models()
if experiment_models:
experiment_model = experiment_models[0]
experiment_model.delete()
assert False, "log_model() call failed and assertions are not run."

def test_create_artifact(self, shared_state):
Expand Down

0 comments on commit f1659e8

Please sign in to comment.