ThongCoder commited on
Commit
f245f86
·
verified ·
1 Parent(s): 77b58ba

Update restore.py

Browse files
Files changed (1) hide show
  1. restore.py +2 -2
restore.py CHANGED
@@ -23,7 +23,7 @@ os.makedirs(env["TMPDIR"], exist_ok=True)
23
  # Step 1: List repo files
24
  print("[Restore] Listing backups in repo...")
25
  result = subprocess.run(
26
- ["huggingface-cli", "ls-files", BACKUP_REPO, "--repo-type", "dataset"],
27
  stdout=subprocess.PIPE,
28
  stderr=subprocess.STDOUT,
29
  text=True,
@@ -43,7 +43,7 @@ print(f"[Restore] Found latest backup: {latest}")
43
  # Step 3: Download
44
  tmpfile = os.path.join(tempfile.gettempdir(), "restore.tar.gz")
45
  subprocess.run(
46
- ["huggingface-cli", "download", BACKUP_REPO, latest, "--repo-type", "dataset", "--local-dir", "/tmp/restore", "--force-download"],
47
  check=True,
48
  env=env,
49
  )
 
23
  # Step 1: List repo files
24
  print("[Restore] Listing backups in repo...")
25
  result = subprocess.run(
26
+ ["hf", "ls-files", BACKUP_REPO, "--repo-type", "dataset"],
27
  stdout=subprocess.PIPE,
28
  stderr=subprocess.STDOUT,
29
  text=True,
 
43
  # Step 3: Download
44
  tmpfile = os.path.join(tempfile.gettempdir(), "restore.tar.gz")
45
  subprocess.run(
46
+ ["hf", "download", BACKUP_REPO, latest, "--repo-type", "dataset", "--local-dir", "/tmp/restore", "--force"],
47
  check=True,
48
  env=env,
49
  )