autointent.modules.abc.Module#
- class autointent.modules.abc.Module#
Bases:
abc.ABC
Base module.
- abstract fit(*args, **kwargs)#
Fit the model.
- abstract score(context, split, metric_fn)#
Calculate metric on test set and return metric value.
- Parameters:
context (autointent.context.Context) – Context to score
split (Literal['validation', 'test']) – Split to score on
metric_fn (autointent.metrics.METRIC_FN) – Metric function
- Return type:
- abstract get_assets()#
Return useful assets that represent intermediate data into context.
- Return type:
- abstract clear_cache()#
Clear cache.
- Return type:
None
- abstract dump(path)#
Dump all data needed for inference.
- Parameters:
path (str) – Path to dump
- Return type:
None
- abstract predict(*args, **kwargs)#
Predict on the input.
- predict_with_metadata(*args, **kwargs)#
Predict on the input with metadata.
- classmethod from_context(context, **kwargs)#
- Abstractmethod:
- Parameters:
context (autointent.context.Context)
- Return type:
Initialize self from context.
- Parameters:
context (autointent.context.Context) – Context to init from.
- Return type: