deeppavlov.core.common¶
Registration and classes initialization functionality, class method decorators.
-
class
deeppavlov.core.common.chainer.
Chainer
(in_x: Union[str, list] = None, out_params: Union[str, list] = None, in_y: Union[str, list] = None, *args, as_component: bool = False, **kwargs)[source]¶ Builds an agent/component pipeline from heterogeneous components (Rule-based/ML/DL). It allows to train and infer models in a pipeline as a whole.
-
deeppavlov.core.common.metrics_registry.
fn_from_str
(name: str) → Callable[..., Any][source]¶ Returns a function object with the name given in string.
-
deeppavlov.core.common.metrics_registry.
get_metrics_by_names
(names: list) → List[Callable[..., Any]][source]¶ Returns a list of metric callables with corresponding names.
-
deeppavlov.core.common.metrics_registry.
register_metric
(metric_name: str) → Callable[..., Any][source]¶ Decorator for metric registration.
-
deeppavlov.core.common.params.
from_params
(params: Dict, mode: str = 'infer', **kwargs) → deeppavlov.core.models.component.Component[source]¶ Builds and returns the Component from corresponding dictionary of parameters.
-
deeppavlov.core.common.registry.
cls_from_str
(name: str) → type[source]¶ Returns a class object with the name given as a string.
-
deeppavlov.core.common.registry.
get_model
(name: str) → type[source]¶ Returns a registered class object with the name given in the string.
-
deeppavlov.core.common.registry.
list_models
() → list[source]¶ Returns a list of names of registered classes.