Skip to content

Commit d2b28f6

Browse files
committed
hf_hub_download -> snapshot_download
1 parent 88abd63 commit d2b28f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rl_zoo3/push_to_hub.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ def package_to_hub(
200200
repo_local_path = Path(local_repo_path) / repo_name
201201

202202
# Retrieve current repo state
203-
api.hf_hub_download(repo_id=repo_id, local_dir=local_repo_path)
203+
api.snapshot_download(repo_id=repo_id, local_dir=local_repo_path)
204204

205205
# Step 1: Save the model
206206
print("Saving model to:", repo_local_path / model_name)
@@ -273,7 +273,7 @@ def package_to_hub(
273273
msg.info(f"Your model is pushed to the hub. You can view your model here: {repo_url}")
274274
return repo_url
275275

276-
276+
HfApi().download(repo_id="rl_zoo3/algo-env", local_dir="hub")
277277
if __name__ == "__main__":
278278
parser = argparse.ArgumentParser()
279279
parser.add_argument("--env", help="Environment ID", type=EnvironmentName, required=True)

0 commit comments

Comments
 (0)