graph LR
Preprocessing_CLI_Tool["Preprocessing CLI Tool"]
Data_Binarizer["Data Binarizer"]
Vocabulary_Dictionary["Vocabulary Dictionary"]
Language_Pair_Dataset["Language Pair Dataset"]
HuBERT_Audio_Dataset["HuBERT Audio Dataset"]
Indexed_Dataset["Indexed Dataset"]
General_Data_Utilities["General Data Utilities"]
Audio_Utilities["Audio Utilities"]
Preprocessing_CLI_Tool -- "orchestrates" --> Data_Binarizer
Preprocessing_CLI_Tool -- "orchestrates" --> Vocabulary_Dictionary
Data_Binarizer -- "uses" --> Vocabulary_Dictionary
Language_Pair_Dataset -- "uses" --> Indexed_Dataset
HuBERT_Audio_Dataset -- "uses" --> Indexed_Dataset
Language_Pair_Dataset -- "utilizes" --> General_Data_Utilities
HuBERT_Audio_Dataset -- "utilizes" --> Audio_Utilities
The fairseq data preprocessing subsystem is centered around efficient data handling for machine learning tasks. The Preprocessing CLI Tool acts as the primary entry point, orchestrating the conversion of raw data into a model-ready format. This process heavily relies on the Data Binarizer to transform input into numerical representations, guided by the Vocabulary Dictionary for consistent token-to-ID mapping. Large datasets are efficiently managed and accessed via the Indexed Dataset component, which serves as a foundational storage layer for both text-based (Language Pair Dataset) and audio-based (HuBERT Audio Dataset) data. Auxiliary functionalities are provided by General Data Utilities for common data manipulations and Audio Utilities for specialized audio processing, ensuring robust and flexible data preparation pipelines.
Serves as the primary command-line interface for initiating the data preparation workflow, including vocabulary building and data binarization. It orchestrates the overall preprocessing steps.
Related Classes/Methods:
Responsible for converting raw textual or other input data into a numerical, binarized format suitable for model consumption. It handles token-to-ID mapping and efficient storage.
Related Classes/Methods:
Manages the mapping between string tokens and numerical IDs, providing a consistent vocabulary across the dataset. It supports adding new symbols and loading pre-existing dictionaries.
Related Classes/Methods:
A specialized dataset implementation for tasks involving source and target language pairs (e.g., machine translation). It handles loading, padding, and batching of linguistic data.
Related Classes/Methods:
A specialized dataset implementation for audio-based tasks, particularly for HuBERT pretraining. It manages the loading of raw audio waveforms and associated labels.
Related Classes/Methods:
Provides an efficient, memory-mapped mechanism for storing and retrieving large datasets from disk. This allows for fast access to individual samples without loading the entire dataset into memory.
Related Classes/Methods:
Provides common data manipulation functionalities like padding, batching, and filtering, essential for preparing diverse datasets for model consumption.
Related Classes/Methods:
Offers audio-specific processing functionalities, such as feature extraction and waveform manipulation, necessary for handling raw audio data within the pipeline.
Related Classes/Methods: