From 6ad0432ade28f40131a2ba5cd0b107662f384164 Mon Sep 17 00:00:00 2001 From: Wauplin Date: Thu, 28 Mar 2024 10:12:14 +0100 Subject: [PATCH] Do not use deprecated list_files_info --- tests/generation/test_hub.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/generation/test_hub.py b/tests/generation/test_hub.py index 002313502..fd0f127ba 100644 --- a/tests/generation/test_hub.py +++ b/tests/generation/test_hub.py @@ -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)