Upload folder using huggingface_hub
Browse files- .github/workflows/sync-to-hf.yml +6 -12
- dexter_cli.py +70 -0
.github/workflows/sync-to-hf.yml
CHANGED
|
@@ -10,22 +10,16 @@ jobs:
|
|
| 10 |
sync-to-hub:
|
| 11 |
runs-on: ubuntu-latest
|
| 12 |
steps:
|
| 13 |
-
- uses: actions/checkout@
|
| 14 |
with:
|
| 15 |
fetch-depth: 0
|
| 16 |
lfs: true
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
- name: Push to hub
|
| 18 |
env:
|
| 19 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 20 |
run: |
|
| 21 |
-
|
| 22 |
-
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
| 23 |
-
git config --global user.name "github-actions[bot]"
|
| 24 |
-
|
| 25 |
-
# Add the Hugging Face repository as a remote
|
| 26 |
-
# Change <YOUR_HF_USERNAME> to your actual Hugging Face username!
|
| 27 |
-
# Type can be "spaces", "models", or "datasets". We use "models" here.
|
| 28 |
-
git remote add huggingface https://user:$HF_TOKEN@huggingface.co/lyffseba/dexter
|
| 29 |
-
|
| 30 |
-
# Force push to the Hugging Face remote
|
| 31 |
-
git push -f huggingface main
|
|
|
|
| 10 |
sync-to-hub:
|
| 11 |
runs-on: ubuntu-latest
|
| 12 |
steps:
|
| 13 |
+
- uses: actions/checkout@v4
|
| 14 |
with:
|
| 15 |
fetch-depth: 0
|
| 16 |
lfs: true
|
| 17 |
+
|
| 18 |
+
- name: Install huggingface_hub
|
| 19 |
+
run: pip install huggingface_hub[cli]
|
| 20 |
+
|
| 21 |
- name: Push to hub
|
| 22 |
env:
|
| 23 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 24 |
run: |
|
| 25 |
+
hf upload lyffseba/dexter . --repo-type model --exclude "labs/autoresearch/.venv/*" --exclude "labs/autoresearch/mojo/.pixi/*" --exclude ".git/*" --exclude ".github/*"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dexter_cli.py
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
import sys
|
| 3 |
+
import time
|
| 4 |
+
|
| 5 |
+
def print_slow(str):
|
| 6 |
+
for letter in str:
|
| 7 |
+
sys.stdout.write(letter)
|
| 8 |
+
sys.stdout.flush()
|
| 9 |
+
time.sleep(0.02)
|
| 10 |
+
print()
|
| 11 |
+
|
| 12 |
+
def clear():
|
| 13 |
+
os.system('cls' if os.name == 'nt' else 'clear')
|
| 14 |
+
|
| 15 |
+
def main():
|
| 16 |
+
clear()
|
| 17 |
+
print_slow("==================================================")
|
| 18 |
+
print_slow(" D E X T E R O S v1.0 ")
|
| 19 |
+
print_slow("==================================================")
|
| 20 |
+
print_slow("\n[SYSTEM] Initializing AI Research Swarm...")
|
| 21 |
+
time.sleep(1)
|
| 22 |
+
print_slow("[SYSTEM] Connecting to Modular Cloud...")
|
| 23 |
+
time.sleep(0.5)
|
| 24 |
+
print_slow("[SYSTEM] Authenticating RunPod API...")
|
| 25 |
+
time.sleep(0.5)
|
| 26 |
+
print_slow("[SYSTEM] Environment: SECURE.\n")
|
| 27 |
+
|
| 28 |
+
print("Welcome, Director lyffseba.")
|
| 29 |
+
print("The lab is funded. The GPUs are standing by.\n")
|
| 30 |
+
|
| 31 |
+
while True:
|
| 32 |
+
print("----- COMMAND MENU -----")
|
| 33 |
+
print("1. [LAB 00] Run Local Diagnostics (Data & Tokenizer)")
|
| 34 |
+
print("2. [LAB 03] Compile Mojo Architecture locally")
|
| 35 |
+
print("3. [RUNPOD] Deploy RTX 3090 (Commence RLHF Training)")
|
| 36 |
+
print("4. [MODULAR] Deploy MAX Inference Endpoint")
|
| 37 |
+
print("5. [EXIT] Disconnect")
|
| 38 |
+
|
| 39 |
+
choice = input("\nAwaiting command (1-5): ")
|
| 40 |
+
|
| 41 |
+
if choice == '1':
|
| 42 |
+
print_slow("\n[EXECUTING] Launching Jupyter Lab for Lab 00...")
|
| 43 |
+
os.system("uv tool run --from jupyterlab jupyter-lab labs/00_getting_started.ipynb")
|
| 44 |
+
elif choice == '2':
|
| 45 |
+
print_slow("\n[EXECUTING] Compiling train.mojo via Pixi...")
|
| 46 |
+
os.system("cd labs/autoresearch/mojo && ~/.pixi/bin/pixi run mojo train.mojo")
|
| 47 |
+
print("\n")
|
| 48 |
+
elif choice == '3':
|
| 49 |
+
print_slow("\n[WARNING] This action will consume RunPod credits ($0.25/hr).")
|
| 50 |
+
confirm = input("Confirm deployment of 1x RTX 3090? (y/n): ")
|
| 51 |
+
if confirm.lower() == 'y':
|
| 52 |
+
print_slow("\n[DEPLOYING] Contacting RunPod API...")
|
| 53 |
+
# The actual runpodctl command goes here
|
| 54 |
+
print_slow("[SUCCESS] Pod 'autoresearch-3090' is booting up.")
|
| 55 |
+
print_slow("[NETWORK] Establishing SSH connection...")
|
| 56 |
+
print_slow("... Standing by for agent 'pi' to take over the instance.\n")
|
| 57 |
+
break
|
| 58 |
+
else:
|
| 59 |
+
print("\n[ABORTED] Deployment cancelled.\n")
|
| 60 |
+
elif choice == '4':
|
| 61 |
+
print_slow("\n[EXECUTING] Preparing Modular MAX serving script...")
|
| 62 |
+
print("Run: bash scripts/02_start_server.sh on your instance.\n")
|
| 63 |
+
elif choice == '5':
|
| 64 |
+
print_slow("\n[SYSTEM] Disconnecting... Goodbye, Director.")
|
| 65 |
+
break
|
| 66 |
+
else:
|
| 67 |
+
print("\n[ERROR] Invalid command.\n")
|
| 68 |
+
|
| 69 |
+
if __name__ == "__main__":
|
| 70 |
+
main()
|