瀏覽代碼

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
Max Ryabinin 2 年之前
父節點
當前提交
a0e8bbd28d
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      .github/workflows/run-tests.yaml
  2. 1 1
      tests/scripts/remove_old_models.py

+ 1 - 1
.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'))")

+ 1 - 1
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)