Skip to content

Commit 29ce266

Browse files
committed
fix function types
Signed-off-by: abrar <abrar@anyscale.com>
1 parent d7131f0 commit 29ce266

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

python/ray/serve/_private/replica.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,9 @@ async def handle_request_with_rejection(
909909
async def _on_initialized(self):
910910
raise NotImplementedError
911911

912-
async def initialize(self, deployment_config: DeploymentConfig, rank: ReplicaRank):
912+
async def initialize(
913+
self, deployment_config: Optional[DeploymentConfig], rank: Optional[ReplicaRank]
914+
):
913915
if rank is not None:
914916
self._rank = rank
915917
self._set_internal_replica_context(
@@ -945,7 +947,7 @@ async def initialize(self, deployment_config: DeploymentConfig, rank: ReplicaRan
945947
record_autoscaling_stats_fn=self._user_callable_wrapper.call_record_autoscaling_stats,
946948
)
947949

948-
if deployment_config:
950+
if deployment_config is not None:
949951
await self._user_callable_wrapper.set_sync_method_threadpool_limit(
950952
deployment_config.max_ongoing_requests
951953
)

0 commit comments

Comments
 (0)