tao-shen Claude Opus 4.6 commited on
Commit
bc5b20f
·
1 Parent(s): 49bf79c

fix: exclude log files from HF sync to prevent LFS errors

Browse files

sync.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>

Files changed (1) hide show
  1. 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 entire directory as-is, no filtering, no sanitization
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=[], # No exclusions
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