-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
39 lines (29 loc) · 1.15 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
install:
pip install --upgrade pip &&\
pip install -r requirements.txt
format:
black *.py
train:
python train.py
eval:
echo "## Model Metrics" > report.md
cat ./Results/metrics.txt >> report.md
echo '\n## Confusion Matrix Plot' >> report.md
echo '![Confusion Matrix](./Results/model_results.png)' >> report.md
cml comment create report.md
update-branch:
git config --global user.name $(USER_NAME)
git config --global user.email $(USER_EMAIL)
git commit -am "Update with new results"
git push --force origin HEAD:update
hf-login:
pip install -U "huggingface_hub[cli]"
git pull origin update
git switch update
huggingface-cli login --token $(HF) --add-to-git-credential
push-hub:
huggingface-cli upload abhinandansonvane/ci-cd-genai ./App --repo-type=space --commit-message="Sync App files"
huggingface-cli upload abhinandansonvane/ci-cd-genai ./Model /Model --repo-type=space --commit-message="Sync Model"
huggingface-cli upload abhinandansonvane/ci-cd-genai ./Results /Metrics --repo-type=space --commit-message="Sync Model"
deploy: hf-login push-hub
all: install format train eval update-branch deploy