LabelTensorizer.ConfigΒΆ
Component: LabelTensorizer
-
class
LabelTensorizer.Config[source] Bases:
Tensorizer.Config
All Attributes (including base classes)
- is_input: bool =
False- column: str =
'label'- The name of the label column to parse from the data source.
- allow_unknown: bool =
False- Whether to allow for unknown labels at test/prediction time.
- pad_in_vocab: bool =
False- Whether vocab should have pad, usually false when label is used as target.
- label_vocab: Optional[list[str]] =
None- The label values, if known. Will skip initialization step if provided.
- label_vocab_file: Optional[str] =
None- File with the label values. This can be used when the label space is too large to specify these as a list. The file should not contain a header.
- add_labels: Optional[list[str]] =
None- Add these labels to the vocabulary during the initialization step (only if the initialization step is not skipped). Useful when the dataset may not include all labels, as for incremental trainings.
- Subclasses
PositiveLabelTensorizerForDenseRetrieval.ConfigLabelListRankTensorizer.ConfigLabelListTensorizer.ConfigSoftLabelTensorizer.Config
Default JSON
{
"is_input": false,
"column": "label",
"allow_unknown": false,
"pad_in_vocab": false,
"label_vocab": null,
"label_vocab_file": null,
"add_labels": null
}