main

lightning_ir.main.main()[source]

Entry point for the Lightning IR command line interface.

Initializes and runs the LightningIRCLI with the LightningIRTrainer and configuration callback. This function serves as the main entry point when Lightning IR is run from the command line using the ‘lightning-ir’ command.

The CLI is configured with: - LightningIRTrainer as the trainer class for all IR operations - LightningIRSaveConfigCallback for automatic config file saving during training - Configuration to save configs as ‘pl_config.yaml’ with overwrite enabled

Examples

This function is called when using Lightning IR from command line:

lightning-ir fit --config fine-tune.yaml
lightning-ir index --config index.yaml
lightning-ir search --config search.yaml
lightning-ir re_rank --config re-rank.yaml

Note

  • Configuration files are automatically saved during fit operations

  • All PyTorch Lightning CLI features are available

  • Supports YAML configuration files and command line argument overrides