Skip to content

Commit

Permalink
fix autoscaling_target_accelerator_duty_cycle check
Browse files Browse the repository at this point in the history
  • Loading branch information
munagekar committed May 11, 2022
1 parent 4bb666b commit 9501eb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion google/cloud/aiplatform/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1011,7 +1011,7 @@ def _deploy_call(
"Both `accelerator_type` and `accelerator_count` should be specified or None."
)

if not accelerator_type or not accelerator_count and autoscaling_target_accelerator_duty_cycle:
if autoscaling_target_accelerator_duty_cycle is not None and (not accelerator_type or not accelerator_count):
raise ValueError(
"Both `accelerator_type` and `accelerator_count` should be set "
"when specifying autoscaling_target_accelerator_duty_cycle`"
Expand Down

0 comments on commit 9501eb0

Please sign in to comment.