Spaces:
Sleeping
Sleeping
Push Bot
commited on
Commit
ยท
4509859
1
Parent(s):
bcfd028
Fix SyntaxError; simplify debug; stage repo zip; make packages.txt empty
Browse files
app.py
CHANGED
|
@@ -1002,7 +1002,18 @@ def debug_compile_last_pipeline_zip():
|
|
| 1002 |
logs = [f"๐ Debug(last-pipeline-zip) at {_now_str()}"]
|
| 1003 |
last_zip = _find_last_pipeline_zip()
|
| 1004 |
if not last_zip:
|
| 1005 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1006 |
|
| 1007 |
# Prepare workspace
|
| 1008 |
run_id, WORK_DIR, LOG_PATH, _ = _prepare_workspace(logs)
|
|
|
|
| 1002 |
logs = [f"๐ Debug(last-pipeline-zip) at {_now_str()}"]
|
| 1003 |
last_zip = _find_last_pipeline_zip()
|
| 1004 |
if not last_zip:
|
| 1005 |
+
repo_zip = ROOT / "output.zip"
|
| 1006 |
+
if repo_zip.exists():
|
| 1007 |
+
try:
|
| 1008 |
+
_, W, L, Z = _prepare_workspace(logs)
|
| 1009 |
+
shutil.copy2(repo_zip, Z)
|
| 1010 |
+
logs.append(f"๐ฆ Auto-staged repo output.zip โ runs/{W.name}/output.zip")
|
| 1011 |
+
last_zip = Z
|
| 1012 |
+
except Exception as e:
|
| 1013 |
+
logs.append(f"โ Auto-stage failed: {e}")
|
| 1014 |
+
return "<div style='color:#b00'>No recent pipeline output.zip found and auto-stage failed.</div>"
|
| 1015 |
+
else:
|
| 1016 |
+
return "<div style='color:#b00'>No recent pipeline output.zip found under runs/.</div>"
|
| 1017 |
|
| 1018 |
# Prepare workspace
|
| 1019 |
run_id, WORK_DIR, LOG_PATH, _ = _prepare_workspace(logs)
|