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

Use a consistent cache directory #264

Closed
constantinpape opened this issue Nov 4, 2023 · 2 comments
Closed

Use a consistent cache directory #264

constantinpape opened this issue Nov 4, 2023 · 2 comments
Assignees

Comments

@constantinpape
Copy link
Contributor

We currently use different cache directories for saving the models vs. saving the sample image data.

  • The models use $HOME/.sam_models.
  • The sample data uses $HOME/.cache/micro-sam

It would be good to be consistent here and I think $HOME/.cache/micro_sam is a good choice. For the models we could use $HOME/.cache/micro_sam/models.

What do you think @GenevieveBuckley ?

@GenevieveBuckley
Copy link
Collaborator

I say it's a good idea and I'm happy to do that.

@constantinpape
Copy link
Contributor Author

Ok! The path for the downloads is currently set here: https://github.com/computational-cell-analytics/micro-sam/blob/master/micro_sam/util.py#L50

The intention behind this code was to enable changing the cache directory via the SAM_MODELS environment variable. But this is not documented anywhere so we can change it.

My suggestion would be that we introduce a new environment variable MICRO_SAM_CACHE instead that defaults to $HOME/.cache/micro_sam. We should keep the option to set a different cache path for systems where the storage in $HOME is limited (e.g. computer clusters).

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

2 participants