-
Notifications
You must be signed in to change notification settings - Fork 540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fs.exists(hub_model_id, refresh=True) does not work correctly after deleting a repository #2552
Comments
In case someone finds this issue later: the current recommended approach is using This works correctly: from huggingface_hub import HfApi, HfFileSystem
import time
api = HfApi()
hfs = HfFileSystem()
hub_model_id = "MoritzLaurer/test-repo"
api.create_repo(hub_model_id, repo_type='model')
print(api.repo_exists(repo_id=hub_model_id))
time.sleep(5)
api.delete_repo(repo_id=hub_model_id, repo_type="model")
time.sleep(5)
print(api.repo_exists(repo_id=hub_model_id)) |
Thanks for reporting @MoritzLaurer. This is indeed a bug in |
Describe the bug
The following code outputs "True" twice, even though the repo is deleted. See this internal thread for details.
Reproduction
Logs
No response
System info
The text was updated successfully, but these errors were encountered: