ertk.preprocessing.fairseq.FairseqExtractorConfig
- class ertk.preprocessing.fairseq.FairseqExtractorConfig(checkpoint: str = '???', layer: str = 'context', aggregate: Agg = Agg.MEAN, device: str = 'cuda', vq_path: str | None = None, vq_ids: bool = False, vq_ids_as_string: bool = True, max_input_len: int = 1500000)
Bases:
ERTKConfigFairseq feature extractor configuration.
- __init__(checkpoint: str = '???', layer: str = 'context', aggregate: Agg = Agg.MEAN, device: str = 'cuda', vq_path: str | None = None, vq_ids: bool = False, vq_ids_as_string: bool = True, max_input_len: int = 1500000) None
Methods
__init__([checkpoint, layer, aggregate, ...])Inherited Methods
default()Create default config.
from_config(config)Create config object from any compatible config.
from_file(path)Create config from YAML file and optionlly override some values.
merge_with_args(args)Merge config with command-line arguments.
merge_with_config(config)Merge other config into this config.
to_dictconfig()Convert config to DictConfig.
to_file(path)Write config to YAML file.
to_string()Generate YAML string representation of config.
Attributes
Aggregation method.
Path to model checkpoint.
Device to run model on.
Layer to extract features from.
Maximum input length.
Whether to return VQ cluster ids.
Whether to return VQ cluster ids as a single string of integers separated by spaces.
Path to vector quantiser.
- aggregate: Agg = 'mean'
Aggregation method.