In order to set up the necessary environment using uv:
uv sync --python 3.12
source .venv/bin/activateFor contributions to the library, additionally install pre-commit hooks:
pre-commit install
pre-commit autoupdateCheck out the configuration under .pre-commit-config.yaml. The -n, --no-verify flag of git commit can be used to deactivate pre-commit hooks temporarily.
Usage¶
To start training, follow these steps:
Make sure you have activated the virtual environment (see Installation).
Create a configuration file, e.g.
your-config.yaml, with the necessary parameters for training.Run the training script in single-node mode, providing the path to the configuration file:
python scripts/train_model.py --config <path/to/your-config.yaml>This will start the training process using the specified configuration and save the trained model to the specified location.
To start training in distributed mode using
torchrun, use the following command:torchrun --nproc_per_node=<number_of_gpus> scripts/train_model.py --config <path/to/your-config.yaml>Replace
<number_of_gpus>with the number of GPUs you want to use for distributed training.Monitor the training progress on tensorboard and adjust the parameters in the configuration file as needed.