Skip to content

Commit

Permalink
Do not use deprecated list_files_info
Browse files Browse the repository at this point in the history
  • Loading branch information
Wauplin committed Mar 28, 2024
1 parent f25a950 commit 6ad0432
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tests/generation/test_hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ def _test_push_to_hub(model, model_path, repo_id, ignore_patterns=[]):
model.push_to_hub(model_path, repo_id, use_auth_token=TOKEN, endpoint=ENDPOINT_STAGING)
api = HfApi(endpoint=ENDPOINT_STAGING, token=TOKEN)
try:
hub_files_info = api.list_files_info(repo_id)
hub_files_path = [info.rfilename for info in hub_files_info]
hub_files_path = api.list_repo_files(repo_id)
for path, _, files in os.walk(model_path):
for name in files:
local_file_path = os.path.join(path, name)
Expand Down

0 comments on commit 6ad0432

Please sign in to comment.