From 2dcec72ecff9dff6137632653c5228b84ccf8f7f Mon Sep 17 00:00:00 2001 From: Ethan White Date: Wed, 18 Sep 2024 20:46:32 -0400 Subject: [PATCH] Use the non-private API for hf_hub errors We were loading from a private module and it looks like the API changed in 0.25 (see Azure errors). This moves to using the public `errors` module, which should be less likely to break without warning. --- deepforest/utilities.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deepforest/utilities.py b/deepforest/utilities.py index a22491cb..308c3b66 100644 --- a/deepforest/utilities.py +++ b/deepforest/utilities.py @@ -20,7 +20,7 @@ import json import urllib.request from huggingface_hub import hf_hub_download -from huggingface_hub.utils._errors import RevisionNotFoundError, HfHubHTTPError +from huggingface_hub.errors import RevisionNotFoundError, HfHubHTTPError def read_config(config_path):