Export function signature to allow introspection of args in tests

This commit is contained in:
shademe 2022-06-14 15:49:01 +02:00
parent d8684f7372
commit f4405ca3ad

View File

@ -1,5 +1,6 @@
# cython: infer_types=True, profile=True
# cython: infer_types=True, profile=True, binding = True
import functools
import inspect
from typing import Iterable, Iterator, Optional, Dict, Tuple, Callable
import srsly
from thinc.api import set_dropout_rate, Model, Optimizer
@ -26,6 +27,7 @@ def trainable_pipe_nvtx_range(func):
with use_nvtx_range(f"{self.name} {func.__name__}"):
return func(self, *args, **kwargs)
inner.__signature__ = inspect.signature(func)
return inner