YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Automated Data preparation and training
Repository Setup for Data and model files
- Install git-xet on your local machine. This is huggingface's tool to manage large files
- Mac
brew install git-xet
- Ubuntu
curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/huggingface/xet-core/refs/heads/main/git_xet/install.sh | sh
- Install huggingface_cli for authentication
- Ubuntu
curl -LsSf https://hf.co/cli/install.sh | bash
- Login to huggingface using your account credentials
hf auth login
- Initialize git xet in the repo
git xet install
- Force Git LFS to only use Hugging Face Run this command in your local repo.
git config xet.url "https://huggingface.co/datasets/ashish19goyal/F5TTS-Hindi"
- Tell git-xet to manage model and data files
git xet track "*.pt" "*.wav" "*.arrow" "*.jsonl" "*.json" "*.png" "*.pdf"
- Commit attributes file to git
git add .gitattributes
git commit -m "Add git-xet attributes"
- Workflow
- Push code + pointers to GitHub
git push origin main
- Push the actual large data files to Hugging Face
git push hf main
Configuration
This setup uses mutliple tools for different purposes as listed below
- Apache airflow: To run pipelines for each of the objectives listed above.
- Apache spark: To run each of the tasks in the pipelines in a distributed manner. This helps in partitioning the data and avoiding out-of-memory errors
- MLFlow: To track multiple training runs with different configurations
- Git xet: To store processed data and model checkpoints on huggingface.
- docker: To deploy Apache airflow, spark, mlflow clusters.
Additional setup
- Create a variables.json file in the root of the repo with following content. This file is not committed to prevent secrets from being exposed.
- If you use Gmail SMTP, do not use your normal Google account password. Use a Google App Password (requires 2-Step Verification) from https://myaccount.google.com/apppasswords.
{
"hf_token": "<huggingface_token>",
"smtp_username": "<smtp_username>",
"smtp_password": "<smtp_app_password>",
"notify_email_to": "<recipient_email>"
}
Usage
This folder contains run.sh script. This script can be used to trigger
- Data analytics:
./run.sh analyse- It produces the analysis report at data/analysis/report.html
- Data cleanup:
./run.sh cleanup- It produces the cleaned data at data/cleanup
- Data preaparation:
./run.sh prepare- This produces the vocabulary at data/prepare/text/vocab.txt
- Audio and text for training are stored as arrow files at data/prepare/arrow
- Hyperparameter tuning:
./run.sh tune- This produces the best hyperparameters at data/hyperparameters/best_params.json
- Training:
./run.sh train - Evaluation:
./run.sh eval - Inferencing:
./run.sh inference
Visualizing performance profiles
Use prefetto to visualize the training profile dumps generated in data/artifacts/*_profile.json
- Open https://ui.perfetto.dev in chrome
- Click Open trace file and pick the profile dump for visualizing