Background
Configuration parameters (model paths, GPU settings, database credentials) are only passed via command line arguments. We need .env file support to centralize configuration management.
Tasks
1. Create .env.example Template
Include variables with comments, inlucding
MODEL_PATH: Path to model directory
N_GPUS: Number of GPUs to use
OUTPUT_DIR: Output directory path
DATA_DIR: Data directory path
and other arguments.
2. Create validate_config.py Script
Validate configuration by checking:
- Required environment variables are set
- File paths exist and are accessible
- Integer values are valid (e.g., N_GPUS > 0)
and necessary other arguments.
3. Update requirements.txt
Add python-dotenv to the dependency list.
4. Update README.md
Add a "Configuration" section explaining:
- How to copy
.env.example to .env
- What each environment variable means
- How to run
python validate_config.py
Definition of Done
Happy Hacking! This task is associated with "OceanBase Developer Carnival" event.
Background
Configuration parameters (model paths, GPU settings, database credentials) are only passed via command line arguments. We need
.envfile support to centralize configuration management.Tasks
1. Create
.env.exampleTemplateInclude variables with comments, inlucding
MODEL_PATH: Path to model directoryN_GPUS: Number of GPUs to useOUTPUT_DIR: Output directory pathDATA_DIR: Data directory pathand other arguments.
2. Create
validate_config.pyScriptValidate configuration by checking:
and necessary other arguments.
3. Update
requirements.txtAdd python-dotenv to the dependency list.
4. Update
README.mdAdd a "Configuration" section explaining:
.env.exampleto.envpython validate_config.pyDefinition of Done
.env.examplecreated with all required variablesvalidate_config.pyvalidates paths, integers, and database connectionrequirements.txtupdatedREADME.mdhas configuration instructionsHappy Hacking! This task is associated with "OceanBase Developer Carnival" event.