diff --git a/jina/serve/executors/__init__.py b/jina/serve/executors/__init__.py index 9e00c8e77a98f..47ee7d6c22ffd 100644 --- a/jina/serve/executors/__init__.py +++ b/jina/serve/executors/__init__.py @@ -655,11 +655,11 @@ def _validate_sagemaker(self): return def _add_dynamic_batching(self, _dynamic_batching: Optional[Dict]): - import collections + from collections.abc import Mapping def deep_update(source, overrides): for key, value in overrides.items(): - if isinstance(value, collections.Mapping) and value: + if isinstance(value, Mapping) and value: returned = deep_update(source.get(key, {}), value) source[key] = returned else: