This repository contains the codebase for the Diet Recommendation project (v1).
data/
: Directory for all data-related itemsraw/
: Raw data, do not alter, do not upload large files to version controlprocessed/
: Processed data, ready for trainingmappings/
: Mappings needed in later processing and trainingembeddings/
: Meal, food, and ingredient embedding and graph data
models/
: Trained model filessrc/
: Source files for the projectpreprocessing/
: Scripts for data preprocessingtraining/
: Scripts for model trainingevaluation/
: Scripts for model evaluationutils/
: Utility scripts and helper functions
logs/
: Logs from model training and evaluationresults/
: Results from model evaluations
- Clone the repository and navigate to the project directory.
- Ensure you are using Python 3.9.
- Run
pip install -r requirements.txt
to install dependencies. - Execute
bash setup_repo.sh
to create the directory structure and initial setup files.
You can run the entire pipeline or individual stages using the Makefile
:
- Run the entire pipeline:
make all
- Only preprocess data:
make preprocess
- Only train models:
make train
- Only evaluate models:
make evaluate
The project is configured with GitHub Actions for Continuous Integration (CI) and Continuous Deployment (CD):
- CI: On every push and pull request to the
main
branch, the CI pipeline tests the code. - CD: The CD pipeline can be triggered manually via GitHub Actions to run the full pipeline, or it's scheduled to run automatically at midnight daily.
We use DVC to track data and model versions:
- Add new data or models:
dvc add your_file_or_directory
- Commit the changes:
git add . && git commit -m "Add changes"
- Push the changes:
git push && dvc push
Refer to the DVC documentation for more details.
This project uses W&B for experiment tracking. Ensure you are logged in to W&B and have it integrated into the training and evaluation scripts.
Refer to the W&B documentation for usage instructions.
To contribute to this project:
- Fork the repository and create a new branch (
git checkout -b feature/AmazingFeature
). - Make changes and test them.
- Commit your changes (
git commit -m 'Add some AmazingFeature'
). - Push to the branch (
git push origin feature/AmazingFeature
). - Open a pull request.
This project is licensed under the Apache-2.0 License. Please see the LICENSE file for details.