Skip to content

Commit

Permalink
[SkyServe] Warn min_replicas = 0 (#2895)
Browse files Browse the repository at this point in the history
min_replicas > 0
  • Loading branch information
MaoZiming authored Dec 23, 2023
1 parent 1bb59fd commit 7609e22
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions sky/serve/service_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ def __init__(
post_data: Optional[Dict[str, Any]] = None,
auto_restart: bool = True,
) -> None:
if min_replicas < 0:
if min_replicas <= 0:
with ux_utils.print_exception_no_traceback():
raise ValueError(
'min_replicas must be greater than or equal to 0')
raise ValueError('min_replicas must be greater than 0')
if max_replicas is not None and max_replicas < min_replicas:
with ux_utils.print_exception_no_traceback():
raise ValueError(
Expand Down

0 comments on commit 7609e22

Please sign in to comment.