sadhumitha-s commited on
Commit
ef707cc
·
1 Parent(s): 705175b

feat: redeploy fresh model weights and demo trajectories

Browse files
Files changed (2) hide show
  1. .github/workflows/hf_sync.yml +29 -0
  2. README.md +0 -9
.github/workflows/hf_sync.yml CHANGED
@@ -18,8 +18,37 @@ jobs:
18
  env:
19
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
20
  run: |
 
21
  git lfs install
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  git remote add hf https://sadhumitha-s:$HF_TOKEN@huggingface.co/spaces/sadhumitha-s/DT-Explorer
 
 
23
  git push --force hf HEAD:main 2> push_err.txt || {
24
  echo "=== HUGGING FACE PUSH ERROR LOG ==="
25
  if [ -n "$HF_TOKEN" ]; then
 
18
  env:
19
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
20
  run: |
21
+ # 1. Initialize Git LFS inside the runner
22
  git lfs install
23
+
24
+ # 2. Configure temporary Git identity for dynamic commit
25
+ git config --global user.email "deploy@github.actions"
26
+ git config --global user.name "GitHub Actions"
27
+
28
+ # 3. Dynamically prepend the Hugging Face YAML frontmatter to README.md on the fly
29
+ cat << 'EOF' > hf_frontmatter.txt
30
+ ---
31
+ title: DT-Explorer
32
+ emoji: 🔍
33
+ colorFrom: blue
34
+ colorTo: indigo
35
+ sdk: docker
36
+ pinned: false
37
+ ---
38
+
39
+ EOF
40
+ cat hf_frontmatter.txt README.md > temp_readme.md
41
+ mv temp_readme.md README.md
42
+ rm hf_frontmatter.txt
43
+
44
+ # 4. Commit the injected frontmatter locally in the runner
45
+ git add README.md
46
+ git commit -m "chore: inject Hugging Face frontmatter metadata dynamically" || echo "No changes to commit"
47
+
48
+ # 5. Configure a named remote to allow Git LFS to authenticate correctly
49
  git remote add hf https://sadhumitha-s:$HF_TOKEN@huggingface.co/spaces/sadhumitha-s/DT-Explorer
50
+
51
+ # 6. Force push using HEAD:main to the hf remote
52
  git push --force hf HEAD:main 2> push_err.txt || {
53
  echo "=== HUGGING FACE PUSH ERROR LOG ==="
54
  if [ -n "$HF_TOKEN" ]; then
README.md CHANGED
@@ -1,12 +1,3 @@
1
- ---
2
- title: DT-Explorer
3
- emoji: 🔍
4
- colorFrom: blue
5
- colorTo: indigo
6
- sdk: docker
7
- pinned: false
8
- ---
9
-
10
  # DT-Circuits: Mechanistic Interpretability for Decision Transformers
11
 
12
  [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A5%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/sadhumitha-s/DT-Explorer)
 
 
 
 
 
 
 
 
 
 
1
  # DT-Circuits: Mechanistic Interpretability for Decision Transformers
2
 
3
  [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A5%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/sadhumitha-s/DT-Explorer)