run command executes a Neurenix model training script with the ability to override configuration parameters from the command line.
Usage
Arguments
| Argument | Type | Default | Description |
|---|---|---|---|
script | string | train.py | Path to the Python training script to execute |
Options
| Option | Type | Default | Description |
|---|---|---|---|
--config | string | config.json | Path to configuration file |
--device | string | None | Device to use (cpu, cuda, auto) |
--batch-size | integer | None | Batch size for training |
--epochs | integer | None | Number of training epochs |
--learning-rate | float | None | Learning rate for optimizer |
Configuration Override
Command-line options override values in the configuration file:- Configuration file is loaded from
--configpath - Command-line options (if provided) override config values
- Updated configuration is written back to the file
- Script runs with the merged configuration
NEURENIX_CONFIG environment variable.
Examples
Run with default settings
Run with custom script and config
Override training parameters
Force CPU training
Use GPU with auto-detection
Combine multiple overrides
Configuration File
The configuration file is typically a JSON file with the following structure:Environment Variables
Therun command sets the following environment variable for the training script:
NEURENIX_CONFIG: Absolute path to the configuration file
Error Handling
Script not found
Configuration file not found
Script execution error
Best Practices
1. Use configuration files for experiments
Create separate config files for different experiments:2. Override for quick iterations
Use command-line overrides for quick parameter sweeps:3. Version control your configs
Keep configuration files in version control to track experiments:4. Use descriptive script names
See Also
- Init command - Initialize projects
- Monitor command - Monitor training
- Eval command - Evaluate models
- Save command - Save model state