Closed wallet-maker closed 2 years ago
Hi @wallet-maker, thank you for using CellTypist!
I find the same problem when trying to download the model manually through curl using os.system in the Jupyter notebook.
If you're getting time-outs and also can't curl
from the terminal when you're in a job you probably need to set up your http_proxy
environment var appropriately to have connectivity. Have a chat with your IT team to sort that.
Maybe defining the model directory manually in models.download_models() would be an option?
There's an option for that already, you need to set the CELLTYPIST_FOLDER
environment variable to the path you want models stored, like this:
export CELLTYPIST_FOLDER='/path/to/model/folder/'
That's explained in section "1.2. Download available models" on this repository's README.md. You can have a look at models.py and see how that works in the code. Try pointing that folder to somewhere you know you have access from the node (possibly some scratch storage?).
Perhaps you have an idea how to solve this more elegantly/ you include an error message/timeout in the?
We can certainly improve on that and add an extra message so you're clear that the error is the model list can't be reached from the current host.
Dear Celltypist Team,
great job. One small problem I encountered when using Celltypist in a Jupyter Notebook on our compute cluster (CentOS Linux Linux 7 (Core)) is that the model download is not working. I have tested this on google colab and it works perfectly fine. Specifically I am referring to this function:
models.download_models()
I noticed that this function as well as the
download_model_index
function it calls use requests. But this gets stalled but doesnt give an error/timeout when using it on our compute cluster. I find the same problem when trying to download the model manually throughcurl
usingos.system
in the Jupyter notebook. I think the issue is that the worker node of the compute cluster doesnt run on the home directory where celltypist is stored.A workaround is getting the Celltypist directory with:
models.models_path
then downloading the model files manually using the urls listed here https://celltypist.cog.sanger.ac.uk/models/models.json .
Perhaps you have an idea how to solve this more elegantly/ you include an error message/timeout in the?:
f.write(requests.get(url).content)](url)
Maybe defining the model directory manually in
models.download_models()
would be an option?This is my environment: