From 7f072e63843a353b5c6e69ab494fdb11fa98b44a Mon Sep 17 00:00:00 2001 From: irfan sharif Date: Tue, 3 Sep 2024 15:09:50 -0400 Subject: [PATCH] s/priority/rank in TaskTemplate (#2184) Purely internal, proto name change. Working through some backend refactors and this naming avoids a conflict with another notion of inter-function priorities in the scheduler. Also align naming with new {target,max}-concurrent-inputs spec (on a per task-template basis). --- modal/functions.py | 2 +- modal_proto/api.proto | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/modal/functions.py b/modal/functions.py index bcab78ba9..082653f0c 100644 --- a/modal/functions.py +++ b/modal/functions.py @@ -832,7 +832,7 @@ async def _load(self: _Function, resolver: Resolver, existing_object_id: Optiona _experimental_concurrent_cancellations=True, _experimental_task_templates=[ api_pb2.TaskTemplate( - priority=1, + rank=1, resources=convert_fn_config_to_resources_config( cpu=cpu, memory=memory, gpu=_experimental_gpu, ephemeral_disk=ephemeral_disk ), diff --git a/modal_proto/api.proto b/modal_proto/api.proto index e2b9e83ab..5652b0ed1 100644 --- a/modal_proto/api.proto +++ b/modal_proto/api.proto @@ -2081,9 +2081,10 @@ message TaskStats { } message TaskTemplate { - uint32 priority = 1; + uint32 rank = 1; Resources resources = 2; - uint32 concurrent_inputs = 3; + uint32 target_concurrent_inputs = 3; + uint32 max_concurrent_inputs = 4; } message TokenFlowCreateRequest {