Upload folder using huggingface_hub
Browse files- modal_train.py +3 -2
modal_train.py
CHANGED
|
@@ -44,7 +44,7 @@ SIZES = {
|
|
| 44 |
@app.function(
|
| 45 |
image=image,
|
| 46 |
gpu="L4",
|
| 47 |
-
timeout=
|
| 48 |
volumes={"/vol": volume},
|
| 49 |
secrets=[Secret.from_dotenv(DOTENV)],
|
| 50 |
)
|
|
@@ -55,7 +55,8 @@ def train_on_l4(hours: float = 20.0, ckpt_every: int = 250,
|
|
| 55 |
|
| 56 |
# ---- pull latest code from HF ----
|
| 57 |
os.makedirs("/root/clanker", exist_ok=True)
|
| 58 |
-
subprocess.run(["hf", "download", CODE_REPO,
|
|
|
|
| 59 |
"--repo-type", "model"], check=True)
|
| 60 |
os.chdir("/root/clanker")
|
| 61 |
|
|
|
|
| 44 |
@app.function(
|
| 45 |
image=image,
|
| 46 |
gpu="L4",
|
| 47 |
+
timeout=82800, # 23h, under Modal's 24h cap
|
| 48 |
volumes={"/vol": volume},
|
| 49 |
secrets=[Secret.from_dotenv(DOTENV)],
|
| 50 |
)
|
|
|
|
| 55 |
|
| 56 |
# ---- pull latest code from HF ----
|
| 57 |
os.makedirs("/root/clanker", exist_ok=True)
|
| 58 |
+
subprocess.run(["hf", "download", CODE_REPO,
|
| 59 |
+
"--local-dir", "/root/clanker",
|
| 60 |
"--repo-type", "model"], check=True)
|
| 61 |
os.chdir("/root/clanker")
|
| 62 |
|