-
-
Notifications
You must be signed in to change notification settings - Fork 271
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
text_prompts.ipynb fails on Initialize LangSAM class #85
Comments
|
I looked in the package files and found that there is only one class, name "SamGeo". If you write "from samgeo import SamGeo", your issues should be resolved. I assume that there may have been a seperate class named "LangSAM" that was deprecated. |
huggingface_hub has been added to requirements.txt. #87 GroundingDINO and supervision are being added to conda-forge (conda-forge/staged-recipes#22907). It can be added to requirements.txt once they become available on conda-forge. |
I like how you're thinking but LangSAM is a class in samgeo/text_sam.py, thus the import statement in text_prompts.ipynb:
I updated to 0.8.1 and now get an OSError thrown by GroundingDINO:
Looks to be something with what LangSAM is using as |
I think I found the source of the problem with text_sam.load_model_hf() When I run the huggingface_hub.hf_hub_download function in the ArcGIS Pro notebook, the cached file path is something like this:
Not sure why this is in a hashed/hex(?) form but obviously that's why SLConfig doesn't see a .py file. If we use the force_filename parameter with hf_hub_download() we can ensure the output filename is the same as the input. Applicable here and here. |
I solved SLConfig is not defined by directly cloning GroundingDINO repo and install it directly.
|
How is this resolved ? |
Environment Information
Description
Tried to run through the notebook. At step "Initialize LangSAM class" it throws a NameError on hf_hub_download.
What I Did
Restarted the kernel and Arc and tried again.
Installed huggingface_hub in the env via mamba, restarted kernel and tried again.
Looks like there's an issue with importing huggingface_hub in text_sam.py module. Should groundingdino and huggingface_hub be added to requirements.txt etc?
The text was updated successfully, but these errors were encountered: