File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
pkg/cortex/serve/cortex_internal Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -53,8 +53,11 @@ def __init__(
5353 self .statsd = datadog .statsd
5454
5555 @property
56- def server_side_batching_enabled (self ):
57- return self .api_spec ["predictor" ].get ("server_side_batching" ) is not None
56+ def python_server_side_batching_enabled (self ):
57+ return (
58+ self .api_spec ["predictor" ].get ("server_side_batching" ) is not None
59+ and self .api_spec ["predictor" ]["type" ] == "python"
60+ )
5861
5962 def metric_dimensions_with_id (self ):
6063 return [
Original file line number Diff line number Diff line change 1515import asyncio
1616import inspect
1717import json
18- import math
1918import os
20- import sys
2119import re
22- import threading
20+ import sys
2321import time
2422import uuid
2523from concurrent .futures import ThreadPoolExecutor
@@ -300,7 +298,7 @@ def start_fn():
300298 local_cache ["predictor_impl" ] = predictor_impl
301299 local_cache ["predict_fn_args" ] = inspect .getfullargspec (predictor_impl .predict ).args
302300
303- if api .server_side_batching_enabled :
301+ if api .python_server_side_batching_enabled :
304302 dynamic_batching_config = api .api_spec ["predictor" ]["server_side_batching" ]
305303 local_cache ["dynamic_batcher" ] = DynamicBatcher (
306304 predictor_impl ,
You can’t perform that action at this time.
0 commit comments