mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-24 00:04:15 +03:00
Export function signature to allow introspection of args in tests
This commit is contained in:
parent
d8684f7372
commit
f4405ca3ad
|
@ -1,5 +1,6 @@
|
||||||
# cython: infer_types=True, profile=True
|
# cython: infer_types=True, profile=True, binding = True
|
||||||
import functools
|
import functools
|
||||||
|
import inspect
|
||||||
from typing import Iterable, Iterator, Optional, Dict, Tuple, Callable
|
from typing import Iterable, Iterator, Optional, Dict, Tuple, Callable
|
||||||
import srsly
|
import srsly
|
||||||
from thinc.api import set_dropout_rate, Model, Optimizer
|
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__}"):
|
with use_nvtx_range(f"{self.name} {func.__name__}"):
|
||||||
return func(self, *args, **kwargs)
|
return func(self, *args, **kwargs)
|
||||||
|
|
||||||
|
inner.__signature__ = inspect.signature(func)
|
||||||
return inner
|
return inner
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user