From a0e8bbd28d94c89744faec4f417554f27bba915c Mon Sep 17 00:00:00 2001 From: Max Ryabinin Date: Tue, 13 Dec 2022 20:01:12 +0400 Subject: [PATCH] Fix arguments in remove_old_models.py (#153) * Fix arguments in remove_old_models.py * Remove unnecessary args.author * Fix the GitHub Action as well --- .github/workflows/run-tests.yaml | 2 +- tests/scripts/remove_old_models.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run-tests.yaml b/.github/workflows/run-tests.yaml index acab39c..aa8b114 100644 --- a/.github/workflows/run-tests.yaml +++ b/.github/workflows/run-tests.yaml @@ -33,7 +33,7 @@ jobs: run: | export HF_TAG=$(python -c "import os; print(os.environ.get('GITHUB_HEAD_REF') or os.environ.get('GITHUB_REF_NAME'))") python -c "from huggingface_hub import delete_repo; delete_repo(token='$BLOOM_TESTING_WRITE_TOKEN', \ - name='test-bloomd-560m-$HF_TAG', organization='bloom-testing')" || true + repo_id='bloom-testing/test-bloomd-560m-$HF_TAG')" || true - name: Convert model and push to hub run: | export HF_TAG=$(python -c "import os; print(os.environ.get('GITHUB_HEAD_REF') or os.environ.get('GITHUB_REF_NAME'))") diff --git a/tests/scripts/remove_old_models.py b/tests/scripts/remove_old_models.py index ac3ba40..598fb3b 100644 --- a/tests/scripts/remove_old_models.py +++ b/tests/scripts/remove_old_models.py @@ -22,4 +22,4 @@ if __name__ == "__main__": if args.dry_run: print(f"{model.modelId} can be deleted") else: - delete_repo(token=args.use_auth_token, name=model.modelId, organization=args.author) + delete_repo(repo_id=model.modelId, token=args.use_auth_token)