Akshit Chaturvedi
commited on
Commit
Β·
c840ff5
1
Parent(s):
30fe508
Updated readme
Browse files- .gitattributes +0 -1
- .github/workflows/sync-to-hf-space.yml +19 -76
- README.md +10 -10
.gitattributes
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
images/*.png filter=lfs diff=lfs merge=lfs -text
|
|
|
|
.github/workflows/sync-to-hf-space.yml
CHANGED
@@ -2,101 +2,44 @@
|
|
2 |
name: Sync to Hugging Face Space
|
3 |
|
4 |
on:
|
5 |
-
push:
|
6 |
-
lfs: false # Checkout LFS pointers first, then explicitly fetch
|
7 |
-
|
8 |
-
- name: Setup Git LFS
|
9 |
-
run: |
|
10 |
-
git lfs install --system --skip-repo # Install LFS
|
11 |
branches:
|
12 |
-
- main
|
13 |
|
14 |
jobs:
|
15 |
sync:
|
16 |
runs-on: ubuntu-latest
|
17 |
steps:
|
18 |
- name: Checkout repository
|
19 |
-
uses: actions/checkout@
|
20 |
with:
|
21 |
-
fetch-depth: 0 # Fetch all history
|
22 |
-
lfs: true # Ensure LFS files are checked out
|
23 |
-
|
24 |
-
- name: Install Git LFS
|
25 |
-
run: | globally
|
26 |
-
echo "Git LFS installed"
|
27 |
-
|
28 |
-
- name: Fetch LFS files from origin (GitHub)
|
29 |
-
# This step ensures the runner downloads the actual LFS file content
|
30 |
-
# associated with the pointers checked out in the previous step.
|
31 |
-
run: |
|
32 |
-
git lfs fetch --all origin
|
33 |
-
git lfs checkout # This replaces pointers with actual files
|
34 |
-
echo "LFS files fetched and checked out"
|
35 |
-
git lfs ls-files # List LFS files to confirm they are present
|
36 |
-
|
37 |
-
- name: Push to Hugging Face Space
|
38 |
-
env:
|
39 |
-
|
40 |
-
git lfs install --skip-repo # Initialize LFS for the git commands
|
41 |
|
42 |
- name: Push to Hugging Face Space
|
43 |
env:
|
44 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
45 |
-
|
46 |
-
|
|
|
47 |
SPACE_ID: GuitarGeorge/Prophet-commodity-stock-analysis
|
48 |
run: |
|
49 |
echo "Attempting to push to Hugging Face Space: $SPACE_ID"
|
|
|
|
|
|
|
50 |
|
51 |
-
|
52 |
-
git
|
53 |
-
echo "Attempting to push to Hugging Face Space: $SPACE_ID"
|
54 |
|
|
|
55 |
git config --global user.email "[email protected]"
|
56 |
git config --global user.name "GitHub Action"
|
57 |
-
|
58 |
-
# Set up the Hugging Face remote
|
59 |
-
# Using dummy username as the token should handle.name "GitHub Action"
|
60 |
-
|
61 |
-
# Add Hugging Face remote. Using a distinct name for the user part can help.
|
62 |
-
# The token is the password.
|
63 |
-
git remote add hf_space "https://hf_ auth
|
64 |
-
git remote add hf_space "https://dummy:${HF_TOKEN}@huggingface.co/spaces/${SPACE_ID}"
|
65 |
-
git remote -v
|
66 |
-
|
67 |
-
# Ensure local LFS files are present (fetched from originaction_user:${HF_TOKEN}@huggingface.co/spaces/${SPACE_ID}"
|
68 |
-
git remote -v
|
69 |
-
|
70 |
-
# Explicitly tell Git to use Hugging Face's LFS transfer agent for this remote.
|
71 |
-
# during checkout with lfs:true)
|
72 |
-
# If checkout with lfs:true is insufficient, explicitly fetch:
|
73 |
-
This is often a key step.
|
74 |
-
git config lfs.https://huggingface.co/spaces/${# echo "Fetching LFS objects from origin (GitHub)..."
|
75 |
-
# git lfs fetch --all origin
|
76 |
-
|
77 |
-
SPACE_ID}.git/info/lfs.locksverify true
|
78 |
-
git config lfs.https://huggingface# Explicitly push LFS objects to the Hugging Face remote first
|
79 |
-
echo "Pushing LFS objects to h.co/spaces/${SPACE_ID}.git/info/lfs.access hf_transfer
|
80 |
-
|
81 |
-
# Push Lf_space (Hugging Face)..."
|
82 |
-
git lfs push --all hf_space
|
83 |
-
|
84 |
-
#FS objects specifically to the Hugging Face remote.
|
85 |
-
# This ensures the LFS files are uploaded to HF's LFS storage.
|
86 |
-
echo "Pushing LFS objects to hf_space..."
|
87 |
-
git lfs push --all hf_space
|
88 |
-
# As a diagnostic, check if LFS thinks they are uploaded for this remote:
|
89 |
-
# git Strategy: Try to push the current commit (HEAD) as a fresh 'main' branch to Hugging Face
|
90 |
-
# This attempts to overwrite the 'main' branch on HF with only the current commit's state and its direct LFS pointers.
|
91 |
-
# It might sever the history on the HF remote from its previous state if the histories are incompatible,
|
92 |
-
# which could be what's needed if old commits are causing the pre-receive hook to fail.
|
93 |
-
echo "Push lfs ls-files | awk '{print $1}' | xargs git lfs check Pushed to hf_space
|
94 |
-
|
95 |
-
# Push the Git references (commits, LFS pointers).
|
96 |
-
echo "Pushing Git references to hf_space..."
|
97 |
-
git push --force hf_space HEAD:refs/heads/main
|
98 |
|
99 |
-
|
100 |
-
|
|
|
|
|
|
|
|
|
101 |
|
102 |
echo "Push to Hugging Face Space completed."
|
|
|
2 |
name: Sync to Hugging Face Space
|
3 |
|
4 |
on:
|
5 |
+
push:
|
|
|
|
|
|
|
|
|
|
|
6 |
branches:
|
7 |
+
- main # Or whatever your default branch is
|
8 |
|
9 |
jobs:
|
10 |
sync:
|
11 |
runs-on: ubuntu-latest
|
12 |
steps:
|
13 |
- name: Checkout repository
|
14 |
+
uses: actions/checkout@v3
|
15 |
with:
|
16 |
+
fetch-depth: 0 # Fetch all history for accurate diffs
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
|
18 |
- name: Push to Hugging Face Space
|
19 |
env:
|
20 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
21 |
+
# Your Hugging Face username
|
22 |
+
HF_USERNAME: GuitarGeorge
|
23 |
+
# The ID of your Space (username/space-name)
|
24 |
SPACE_ID: GuitarGeorge/Prophet-commodity-stock-analysis
|
25 |
run: |
|
26 |
echo "Attempting to push to Hugging Face Space: $SPACE_ID"
|
27 |
+
# Add Hugging Face as a remote
|
28 |
+
# The username in the URL is important for Git to use the correct token
|
29 |
+
git remote add hf_space "https://dummy:${HF_TOKEN}@huggingface.co/spaces/${SPACE_ID}"
|
30 |
|
31 |
+
# Check if the remote was added
|
32 |
+
git remote -v
|
|
|
33 |
|
34 |
+
# Configure Git user (sometimes needed in CI, though token auth often bypasses this need for commit identity)
|
35 |
git config --global user.email "[email protected]"
|
36 |
git config --global user.name "GitHub Action"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
|
38 |
+
# Attempt to push. Using -f to force push might be needed if the histories diverge,
|
39 |
+
# but be cautious. A safer approach is to ensure clean history.
|
40 |
+
# For a simple sync, `git push hf_space main` might be enough if main on HF mirrors main on GitHub.
|
41 |
+
# If you want to ensure the Space always reflects the GitHub main branch, a force push is common.
|
42 |
+
# Be aware that force push overwrites the history on the remote.
|
43 |
+
git push --force hf_space HEAD:refs/heads/main
|
44 |
|
45 |
echo "Push to Hugging Face Space completed."
|
README.md
CHANGED
@@ -83,30 +83,30 @@ The following table summarizes the performance metrics observed for each ticker
|
|
83 |
*(These plots illustrate how the model's forecast (blue line) and confidence interval (shaded area) compared against the actual test data (black dots) during a historical backtest run.)*
|
84 |
|
85 |
**DBA - Test Forecast vs. Actuals**
|
86 |
-

|
107 |
|
108 |
**XOM - Test Forecast vs. Actuals**
|
109 |
-
.*
|
112 |
|
|
|
83 |
*(These plots illustrate how the model's forecast (blue line) and confidence interval (shaded area) compared against the actual test data (black dots) during a historical backtest run.)*
|
84 |
|
85 |
**DBA - Test Forecast vs. Actuals**
|
86 |
+

|
87 |
|
88 |
**FCX - Test Forecast vs. Actuals**
|
89 |
+

|
90 |
+
)
|
91 |
|
92 |
**GLD - Test Forecast vs. Actuals**
|
93 |
+

|
94 |
+
)
|
95 |
|
96 |
**NEM - Test Forecast vs. Actuals**
|
97 |
+

|
98 |
|
99 |
**SLV - Test Forecast vs. Actuals**
|
100 |
+

|
101 |
|
102 |
**UNG - Test Forecast vs. Actuals**
|
103 |
+

|
104 |
|
105 |
**USO - Test Forecast vs. Actuals**
|
106 |
+

|
|
|
|
|
107 |
|
108 |
**XOM - Test Forecast vs. Actuals**
|
109 |
+

|
110 |
|
111 |
*(Image for XOM provided shows a wide confidence interval, indicating high uncertainty in the long-term forecast for this particular backtest period).*
|
112 |
|