Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions instill/helpers/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ class ImageToImageInput:
"num_cpus": 0,
}
DEFAULT_AUTOSCALING_CONFIG = {
"target_num_ongoing_requests_per_replica": 2,
"target_ongoing_requests": 2,
"initial_replicas": 1,
"min_replicas": 0,
Expand All @@ -124,8 +125,8 @@ class ImageToImageInput:
"PYTHONPATH": os.getcwd(),
},
}
DEFAULT_MAX_ONGOING_REQUESTS = 5
DEFAULT_MAX_QUEUED_REQUESTS = 10
DEFAULT_MAX_ONGOING_REQUESTS = 6
DEFAULT_MAX_QUEUED_REQUESTS = 100

RAM_MINIMUM_RESERVE = 1 # GB
RAM_UPSCALE_FACTOR = 1.25
Expand Down
3 changes: 3 additions & 0 deletions instill/helpers/ray_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ def __init__(self, deployable: Deployment) -> None:

is_test_model = os.getenv(ENV_IS_TEST_MODEL)
if is_test_model is not None and is_test_model.lower() == "true":
self._update_max_replicas(1000)
self._update_num_cpus(float(0.001))
self._update_upscale_delay(30)
self._update_downscale_delay(60)

is_high_scale_model = os.getenv(ENV_IS_HIGH_SCALE_MODEL)
Expand Down Expand Up @@ -205,5 +207,6 @@ def instill_deployment(
ray_actor_options=DEFAULT_RAY_ACTOR_OPTIONS,
autoscaling_config=DEFAULT_AUTOSCALING_CONFIG,
max_ongoing_requests=DEFAULT_MAX_ONGOING_REQUESTS,
max_concurrent_queries=DEFAULT_MAX_ONGOING_REQUESTS,
max_queued_requests=DEFAULT_MAX_QUEUED_REQUESTS,
)