Skip to content
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

load_SAM isn't expanding $HOME #3

Open
fikisipi opened this issue Aug 15, 2024 · 0 comments
Open

load_SAM isn't expanding $HOME #3

fikisipi opened this issue Aug 15, 2024 · 0 comments

Comments

@fikisipi
Copy link

fikisipi commented Aug 15, 2024

isdir is not supposed to be used with ~:

>>> os.isdir("~/.cache")
False
>>>

It needs to be expanded to the user:

if not os.path.isdir("~/.cache/autodistill/segment_anything_2/segment-anything-2"):
subprocess.run(
[

and you already did in some places, for example just like here:

AUTODISTILL_CACHE_DIR = os.path.expanduser("~/.cache/autodistill")
GROUDNING_DINO_CACHE_DIR = os.path.join(AUTODISTILL_CACHE_DIR, "groundingdino")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant