templates.MultiPolarModelBasedTemplateSchema
- class templates.MultiPolarModelBasedTemplateSchema(*args, **kwargs)
Multipolar Model Based template
Parameters
Parameters
- The specific model used, must be contained in:
[“zsl_text_match”, “zsl_entailment”, “masked_lm”, “logistic_regression”, “one_class_svm”, “tfidf_logreg”, “setfit”, “sdnet”, “sequence_embedding”]
Name Type Default Info include_fields List[str]
The fields to include in the model featurization. target_field str
The field containing the model predictions. model_type str
model_name str
A user specified string name given to the trained model. value None
Inherited from ModelBasedTemplateSchema, but not used. dirpath str
The path to the stored model in minio. threshold float
The confidence threshold below which this LF should abstain. unique_model_name Optional[str]
None
A unique name for the model, usually the same as dirpath. is_multilabel bool
False
Whether or not the task this LF is being applied to is multi-label. multilabel_absent_as_abstain bool
True
If this is a multi-label task, True if we should replace “absent” votes output by the model with “abstain” votes. inv_label_map Dict[str, int]
A mapping from the user’s class labels to the LF’s class labels.