Skip to content

Commit ef707cc

Browse files
committed
feat: redeploy fresh model weights and demo trajectories
1 parent 705175b commit ef707cc

2 files changed

Lines changed: 29 additions & 9 deletions

File tree

.github/workflows/hf_sync.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,37 @@ jobs:
1818
env:
1919
HF_TOKEN: ${{ secrets.HF_TOKEN }}
2020
run: |
21+
# 1. Initialize Git LFS inside the runner
2122
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
2249
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
2352
git push --force hf HEAD:main 2> push_err.txt || {
2453
echo "=== HUGGING FACE PUSH ERROR LOG ==="
2554
if [ -n "$HF_TOKEN" ]; then

README.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -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-
101
# DT-Circuits: Mechanistic Interpretability for Decision Transformers
112

123
[![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A5%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/sadhumitha-s/DT-Explorer)

0 commit comments

Comments
 (0)