Spaces:
Paused
Paused
fix: exclude log files from HF sync to prevent LFS errors
Browse filessync.log grows to 60MB+ and triggers HF LFS pointer errors on upload.
Exclude *.log files from sync since they are transient runtime artifacts.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- scripts/sync_hf.py +2 -2
scripts/sync_hf.py
CHANGED
|
@@ -172,7 +172,7 @@ class OpenClawFullSync:
|
|
| 172 |
print("[SYNC] Nothing to upload.")
|
| 173 |
return
|
| 174 |
|
| 175 |
-
# Upload
|
| 176 |
self.api.upload_folder(
|
| 177 |
folder_path=str(OPENCLAW_HOME),
|
| 178 |
path_in_repo=DATASET_PATH,
|
|
@@ -180,7 +180,7 @@ class OpenClawFullSync:
|
|
| 180 |
repo_type="dataset",
|
| 181 |
token=HF_TOKEN,
|
| 182 |
commit_message=f"Sync .openclaw — {datetime.now().isoformat()}",
|
| 183 |
-
ignore_patterns=[], #
|
| 184 |
)
|
| 185 |
print(f"[SYNC] ✓ Upload completed at {datetime.now().isoformat()}")
|
| 186 |
|
|
|
|
| 172 |
print("[SYNC] Nothing to upload.")
|
| 173 |
return
|
| 174 |
|
| 175 |
+
# Upload directory, excluding large log files that trigger LFS errors
|
| 176 |
self.api.upload_folder(
|
| 177 |
folder_path=str(OPENCLAW_HOME),
|
| 178 |
path_in_repo=DATASET_PATH,
|
|
|
|
| 180 |
repo_type="dataset",
|
| 181 |
token=HF_TOKEN,
|
| 182 |
commit_message=f"Sync .openclaw — {datetime.now().isoformat()}",
|
| 183 |
+
ignore_patterns=["*.log", "*.log.*"], # Exclude logs (sync.log is 60MB+, triggers LFS errors)
|
| 184 |
)
|
| 185 |
print(f"[SYNC] ✓ Upload completed at {datetime.now().isoformat()}")
|
| 186 |
|