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 strThe field containing the model predictions. model_type strmodel_name strA user specified string name given to the trained model. value NoneInherited from ModelBasedTemplateSchema, but not used. dirpath strThe path to the stored model in minio. threshold floatThe confidence threshold below which this LF should abstain. unique_model_name Optional[str]NoneA unique name for the model, usually the same as dirpath. is_multilabel boolFalseWhether or not the task this LF is being applied to is multi-label. multilabel_absent_as_abstain boolTrueIf 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.