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
if 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.
Subclasses
  • LabelListTensorizer.Config
  • SoftLabelTensorizer.Config

Default JSON

{
    "is_input": false,
    "column": "label",
    "allow_unknown": false,
    "pad_in_vocab": false,
    "label_vocab": null
}