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, **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.
-
pipe¶ list of components and their input and output variable names for inference
-
train_pipe¶ list of components and their input and output variable names for training and evaluation
-
in_x¶ names of inputs for pipeline inference mode
-
out_params¶ names of pipeline inference outputs
-
in_y¶ names of additional inputs for pipeline training and evaluation modes
-
forward_map¶ list of all variables in chainer’s memory after running every component in
self.pipe
-
train_map¶ list of all variables in chainer’s memory after running every component in
train_pipe.pipe
-
main¶ reference to the main component
Parameters: - in_x – names of inputs for pipeline inference mode
- out_params – names of pipeline inference outputs
- in_y – names of additional inputs for pipeline training and evaluation modes
-
-
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_metric_by_name(name: str) → Callable[..., Any][source]¶ Returns a metric callable with a corresponding name.
-
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', serialized: Any = None, **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.