Skip to content

Commit

Permalink
Use primary API for huggingface_hub errors (#786)
Browse files Browse the repository at this point in the history
* Remove duplicate import

* 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.
  • Loading branch information
ethanwhite authored Sep 19, 2024
1 parent a17411e commit 46bd2fe
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions deepforest/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

from PIL import Image
from deepforest import _ROOT
import json
import warnings
import geopandas as gpd
import rasterio
Expand All @@ -21,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):
Expand Down

0 comments on commit 46bd2fe

Please sign in to comment.