diff --git a/jina/serve/executors/__init__.py b/jina/serve/executors/__init__.py index 8daa6616110e3..fefdcf981360c 100644 --- a/jina/serve/executors/__init__.py +++ b/jina/serve/executors/__init__.py @@ -400,7 +400,9 @@ def __init__( if __dry_run_endpoint__ not in self.requests: self.requests[ __dry_run_endpoint__ - ] = _FunctionWithSchema.get_function_with_schema(self._dry_run_func) + ] = _FunctionWithSchema.get_function_with_schema( + self.__class__._dry_run_func + ) else: self.logger.warning( f' Endpoint {__dry_run_endpoint__} is defined by the Executor. Be aware that this endpoint is usually reserved to enable health checks from the Client through the gateway.' @@ -409,7 +411,9 @@ def __init__( if type(self) == BaseExecutor: self.requests[ __default_endpoint__ - ] = _FunctionWithSchema.get_function_with_schema(self._dry_run_func) + ] = _FunctionWithSchema.get_function_with_schema( + self.__class__._dry_run_func + ) self._lock = contextlib.AsyncExitStack() try: diff --git a/jina/serve/executors/decorators.py b/jina/serve/executors/decorators.py index 93b9e443efda3..8317b28794761 100644 --- a/jina/serve/executors/decorators.py +++ b/jina/serve/executors/decorators.py @@ -5,7 +5,7 @@ from pathlib import Path from typing import Callable, Dict, List, Optional, Sequence, Type, Union -from jina._docarray import Document, DocumentArray, docarray_v2 +from jina._docarray import Document, DocumentArray from jina.constants import __cache_path__ from jina.helper import is_generator, iscoroutinefunction from jina.importer import ImportExtensions