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
pull/156/head
Max Ryabinin 1 year ago committed by GitHub
parent 701ec7e53e
commit a0e8bbd28d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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'))")

@ -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)

Loading…
Cancel
Save