weigertlab / spotiflow

Accurate and efficient spot detection for microscopy data
https://weigertlab.github.io/spotiflow/
BSD 3-Clause "New" or "Revised" License
57 stars 7 forks source link

enable different bespoke model cache dir #15

Closed BioinfoTongLI closed 1 month ago

BioinfoTongLI commented 2 months ago

Current the pretrained model are saved to the user home folder https://github.com/weigertlab/spotiflow/blob/main/spotiflow/model/pretrained.py#L24-L25

Describe the solution you'd like Would be great to support custume directory to facilitate HPC runs.

AlbertDominguez commented 2 months ago

Hi @BioinfoTongLI, thanks for bringing this up! i just released a new version to PyPi which allows changing the cache directory where models (and datasets) are saved. You can just set an env var now (SPOTIFLOW_CACHE_DIR) and, if it exists, it will use that directory instead (see here). That should facilitate the HPC runs :)