Spaces:
Sleeping
Sleeping
updated main.yaml
Browse files
.github/workflows/main.yaml
CHANGED
|
@@ -36,7 +36,8 @@ jobs:
|
|
| 36 |
|
| 37 |
# --- THIS IS THE FIX ---
|
| 38 |
- name: Pull DVC Artifacts
|
| 39 |
-
|
|
|
|
| 40 |
|
| 41 |
- name: Log in to Hugging Face Hub
|
| 42 |
env:
|
|
@@ -53,13 +54,6 @@ jobs:
|
|
| 53 |
git config --global user.email "action@github.com"
|
| 54 |
git config --global user.name "GitHub Action"
|
| 55 |
git clone https://huggingface.co/spaces/${HF_USERNAME}/${HF_SPACE_NAME} hf_space_repo
|
| 56 |
-
|
| 57 |
-
# We need to copy the dvc.yaml and dvc.lock files for the pull to work in the previous step
|
| 58 |
-
# This is incorrect. The pull happens before the clone. Let's fix the logic.
|
| 59 |
-
# The checkout action already brings dvc.yaml and dvc.lock
|
| 60 |
-
|
| 61 |
-
# The directory structure will be correct after the dvc pull.
|
| 62 |
-
# We just need to copy the final app and the pulled model.
|
| 63 |
rsync -av --delete app/ app.py requirements.txt README.md artifacts/model_training/model/ hf_space_repo/
|
| 64 |
cd hf_space_repo
|
| 65 |
git add .
|
|
|
|
| 36 |
|
| 37 |
# --- THIS IS THE FIX ---
|
| 38 |
- name: Pull DVC Artifacts
|
| 39 |
+
# We specify the stage name directly as a target, without the -s flag
|
| 40 |
+
run: dvc pull model_training -f
|
| 41 |
|
| 42 |
- name: Log in to Hugging Face Hub
|
| 43 |
env:
|
|
|
|
| 54 |
git config --global user.email "action@github.com"
|
| 55 |
git config --global user.name "GitHub Action"
|
| 56 |
git clone https://huggingface.co/spaces/${HF_USERNAME}/${HF_SPACE_NAME} hf_space_repo
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
rsync -av --delete app/ app.py requirements.txt README.md artifacts/model_training/model/ hf_space_repo/
|
| 58 |
cd hf_space_repo
|
| 59 |
git add .
|