This guide outlines the Git workflow and rules for the NutriHelp AI Team. It covers best practices for managing changes to AI models and the API endpoint server, ensuring consistency, reproducibility, and clean collaboration.
nutrihelp/ βββ ai_model/ # AI model training, evaluation scripts βββ ai_api/ # FastAPI or Flask API code βββ data/ # (Optional) Reference to processed datasets (avoid raw/large files) βββ notebooks/ # Exploratory or model training notebooks βββ README.md βββ requirements.txt
markdown Copy Edit
main: Production-ready model + API.dev: AI teamβs integration branch (do NOT push tomaindirectly).model/[model-name-version]: For changes related to training/evaluating a new model.api/[feature-name]: For AI API development (e.g., new endpoints).refactor/[scope]: For code clean-up or architecture improvements.docs/[purpose]: For document management.
git checkout -b model/obesity-prediction-v2
Use conventional commits to maintain clarity.
Examples: feat(model): add CNN obesity classifier
fix(api): handle missing input data error
refactor(api): restructure prediction pipeline
docs(model): update README with training steps
Push changes to a feature branch.
Create PR to dev-ai.
Include:
Description of what changed
Input/output format (for model or API)
Sample cURL or Postman request (if endpoint changed)
Any breaking changes or model version updates
Tag at least one team member for review.
Always save trained models with version identifiers:
Copy Edit obesity_model_v1.keras scaler_v1.pkl
Push directly to main or dev. Hardcode paths, credentials, or secrets in scripts or API code.
Store .env locally (include .env.example in repo).
Keep model registry or cloud API keys out of version control.