Teichlab / celltypist

A tool for semi-automatic cell type classification
https://www.celltypist.org/
MIT License
260 stars 40 forks source link

model download - requests not working #28

Closed wallet-maker closed 2 years ago

wallet-maker commented 2 years ago

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 through curl 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.

def download_model_index(only_model: bool = True) -> None:
    """
    Download the `models.json` file from the remote server.
    Parameters
    ----------
    only_model
        If set to `False`, will also download the models in addition to the json file.
        (Default: `True`)
    """
    url = 'https://celltypist.cog.sanger.ac.uk/models/models.json'
    logger.info(f"πŸ“œ Retrieving model list from server {url}")
    with open(get_model_path("models.json"), "wb") as f:
        f.write(requests.get(url).content)
    model_count = len(requests.get(url).json()["models"])
    logger.info(f"πŸ“š Total models in list: {model_count}")
    if not only_model:
        download_models()

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:


# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       1_gnu    conda-forge
_r-mutex                  1.0.1               anacondar_1    conda-forge
alabaster                 0.7.12                     py_0    conda-forge
anndata                   0.8.0            py37h89c1867_0    conda-forge
anyio                     3.5.0            py37h89c1867_0    conda-forge
argon2-cffi               21.3.0             pyhd8ed1ab_0    conda-forge
argon2-cffi-bindings      21.2.0           py37h540881e_2    conda-forge
arpack                    3.7.0                hdefa2d7_2    conda-forge
astor                     0.8.1              pyh9f0ad1d_0    conda-forge
attrs                     21.4.0             pyhd8ed1ab_0    conda-forge
autograd                  1.3                        py_0    conda-forge
autograd-gamma            0.5.0              pyh9f0ad1d_0    conda-forge
babel                     2.9.1              pyh44b312d_0    conda-forge
backcall                  0.2.0              pyh9f0ad1d_0    conda-forge
backports                 1.0                        py_2    conda-forge
backports.functools_lru_cache 1.6.4              pyhd8ed1ab_0    conda-forge
backports.zoneinfo        0.2.1            py37h5e8e339_4    conda-forge
beautifulsoup4            4.10.0                   pypi_0    pypi
binutils_impl_linux-64    2.36.1               h193b22a_2    conda-forge
binutils_linux-64         2.36                hf3e587d_10    conda-forge
biothings_client          0.2.6              pyh5e36f6f_0    bioconda
blas                      1.1                    openblas    conda-forge
bleach                    4.1.0                    pypi_0    pypi
blosc                     1.21.0               h9c3ff4c_0    conda-forge
brewer2mpl                1.4.1                    pypi_0    pypi
brotli                    1.0.9                h7f98852_6    conda-forge
brotli-bin                1.0.9                h7f98852_6    conda-forge
brotlipy                  0.7.0           py37h540881e_1004    conda-forge
bwidget                   1.9.14               ha770c72_1    conda-forge
bzip2                     1.0.8                h7f98852_4    conda-forge
c-ares                    1.18.1               h7f98852_0    conda-forge
ca-certificates           2022.5.18.1          ha878542_0    conda-forge
cached-property           1.5.2                hd8ed1ab_1    conda-forge
cached_property           1.5.2              pyha770c72_1    conda-forge
cairo                     1.16.0            ha12eb4b_1010    conda-forge
cellrank                  1.0.0rc4                   py_0    bioconda
celltypist                0.1.9              pyhdfd78af_0    bioconda
certifi                   2021.10.8                pypi_0    pypi
cffi                      1.15.0           py37h036bc23_0    conda-forge
charset-normalizer        2.0.12             pyhd8ed1ab_0    conda-forge
click                     8.1.3            py37h89c1867_0    conda-forge
cloudpickle               2.1.0              pyhd8ed1ab_0    conda-forge
cmake                     3.22.4                   pypi_0    pypi
colorama                  0.4.4              pyh9f0ad1d_0    conda-forge
cryptography              36.0.0           py37h9ce1e76_0  
cudatoolkit               10.1.243            h036e899_10    conda-forge
curl                      7.82.0               h2283fc2_0    conda-forge
cycler                    0.11.0             pyhd8ed1ab_0    conda-forge
cython                    0.29.28                  pypi_0    pypi
cytoolz                   0.11.2           py37h540881e_2    conda-forge
dask-core                 1.1.4                    py37_1  
debugpy                   1.5.1                    pypi_0    pypi
decorator                 5.1.1              pyhd8ed1ab_0    conda-forge
defusedxml                0.7.1              pyhd8ed1ab_0    conda-forge
docrep                    0.3.2              pyh44b312d_0    conda-forge
docutils                  0.17.1           py37h89c1867_2    conda-forge
entrypoints               0.4                pyhd8ed1ab_0    conda-forge
enum34                    1.1.10           py37hc8dfbb8_2    conda-forge
et_xmlfile                1.0.1                   py_1001    conda-forge
expat                     2.4.8                h27087fc_0    conda-forge
fa2                       0.3.5                    pypi_0    pypi
fcsparser                 0.2.4                    pypi_0    pypi
flit-core                 3.7.1              pyhd8ed1ab_0    conda-forge
font-ttf-dejavu-sans-mono 2.37                 hab24e00_0    conda-forge
font-ttf-inconsolata      3.000                h77eed37_0    conda-forge
font-ttf-source-code-pro  2.038                h77eed37_0    conda-forge
font-ttf-ubuntu           0.83                 hab24e00_0    conda-forge
fontconfig                2.14.0               h8e229c2_0    conda-forge
fonts-conda-ecosystem     1                             0    conda-forge
fonts-conda-forge         1                             0    conda-forge
fonttools                 4.30.0           py37h540881e_0    conda-forge
formulaic                 0.3.4              pyhd8ed1ab_0    conda-forge
freetype                  2.10.4               h0708190_1    conda-forge
fribidi                   1.0.10               h36c2ea0_0    conda-forge
future                    0.18.2           py37h89c1867_5    conda-forge
future_fstrings           1.2.0            py37h89c1867_3    conda-forge
gcc_impl_linux-64         9.4.0               h03d3576_16    conda-forge
gcc_linux-64              9.4.0               h391b98a_10    conda-forge
gettext                   0.19.8.1          h73d1719_1008    conda-forge
gfortran_impl_linux-64    9.4.0               h0003116_16    conda-forge
gfortran_linux-64         9.4.0               hf0ab688_10    conda-forge
giflib                    5.2.1                h36c2ea0_2    conda-forge
glpk                      4.65              h9202a9a_1004    conda-forge
gmp                       6.2.1                h58526e2_0    conda-forge
graphite2                 1.3.13            h58526e2_1001    conda-forge
gsl                       2.7                  he838d99_0    conda-forge
gxx_impl_linux-64         9.4.0               h03d3576_16    conda-forge
gxx_linux-64              9.4.0               h0316aca_10    conda-forge
h5py                      3.6.0           nompi_py37hd308b1e_100    conda-forge
harfbuzz                  3.4.0                hb4a5f5f_0    conda-forge
harmonyts                 0.1.4                    pypi_0    pypi
hdf5                      1.12.1          nompi_h4df4325_104    conda-forge
icu                       69.1                 h9c3ff4c_0    conda-forge
idna                      3.3                pyhd8ed1ab_0    conda-forge
igraph                    0.9.7                hf5496dd_0    conda-forge
imagecodecs-lite          2019.12.3        py37hda87dfa_5    conda-forge
imageio                   2.19.2             pyhcf75d05_0    conda-forge
imagesize                 1.3.0              pyhd8ed1ab_0    conda-forge
importlib-metadata        4.11.3           py37h89c1867_0    conda-forge
importlib-resources       5.4.0                    pypi_0    pypi
importlib_metadata        4.11.3               hd8ed1ab_0    conda-forge
importlib_resources       5.7.1              pyhd8ed1ab_0    conda-forge
iniconfig                 1.1.1              pyh9f0ad1d_0    conda-forge
intel-openmp              2022.0.1          h06a4308_3633  
interface_meta            1.3.0              pyhd8ed1ab_0    conda-forge
ipykernel                 6.9.2                    pypi_0    pypi
ipython                   7.32.0           py37h89c1867_0    conda-forge
ipython-genutils          0.2.0                    pypi_0    pypi
ipython_genutils          0.2.0                      py_1    conda-forge
jbig                      2.1               h7f98852_2003    conda-forge
jedi                      0.18.1           py37h89c1867_1    conda-forge
jinja2                    3.0.3                    pypi_0    pypi
joblib                    1.1.0              pyhd8ed1ab_0    conda-forge
joypy                     0.2.6                    pypi_0    pypi
jpeg                      9e                   h7f98852_0    conda-forge
json5                     0.9.6                    pypi_0    pypi
jsonpickle                2.1.0                    pypi_0    pypi
jsonschema                4.4.0              pyhd8ed1ab_0    conda-forge
jupyter-client            7.1.2                    pypi_0    pypi
jupyter-server            1.15.6                   pypi_0    pypi
jupyter_client            7.3.0              pyhd8ed1ab_0    conda-forge
jupyter_core              4.9.2            py37h89c1867_0    conda-forge
jupyter_server            1.16.0             pyhd8ed1ab_1    conda-forge
jupyterlab                3.3.2                    pypi_0    pypi
jupyterlab-pygments       0.1.2                    pypi_0    pypi
jupyterlab-server         2.11.2                   pypi_0    pypi
jupyterlab_pygments       0.2.2              pyhd8ed1ab_0    conda-forge
jupyterlab_server         2.13.0             pyhd8ed1ab_1    conda-forge
kaleido                   0.2.1                    pypi_0    pypi
kernel-headers_linux-64   2.6.32              he073ed8_15    conda-forge
keyutils                  1.6.1                h166bdaf_0    conda-forge
kiwisolver                1.4.0            py37h7cecad7_0    conda-forge
kneed                     0.7.0                    pypi_0    pypi
krb5                      1.19.3               h08a2579_0    conda-forge
lcms2                     2.12                 hddcbb42_0    conda-forge
ld_impl_linux-64          2.36.1               hea4e1c9_2    conda-forge
leidenalg                 0.8.10                   pypi_0    pypi
lerc                      3.0                  h9c3ff4c_0    conda-forge
libblas                   3.9.0           13_linux64_openblas    conda-forge
libbrotlicommon           1.0.9                h7f98852_6    conda-forge
libbrotlidec              1.0.9                h7f98852_6    conda-forge
libbrotlienc              1.0.9                h7f98852_6    conda-forge
libcblas                  3.9.0           13_linux64_openblas    conda-forge
libcurl                   7.82.0               h2283fc2_0    conda-forge
libdeflate                1.10                 h7f98852_0    conda-forge
libedit                   3.1.20191231         he28a2e2_2    conda-forge
libev                     4.33                 h516909a_1    conda-forge
libffi                    3.4.2                h7f98852_5    conda-forge
libgcc                    7.2.0                h69d50b8_2    conda-forge
libgcc-devel_linux-64     9.4.0               hd854feb_16    conda-forge
libgcc-ng                 11.2.0              h1d223b6_14    conda-forge
libgfortran-ng            11.2.0              h69a702a_14    conda-forge
libgfortran5              11.2.0              h5c6108e_14    conda-forge
libglib                   2.70.2               h174f98d_4    conda-forge
libgomp                   11.2.0              h1d223b6_14    conda-forge
libiconv                  1.16                 h516909a_0    conda-forge
liblapack                 3.9.0           13_linux64_openblas    conda-forge
libllvm9                  9.0.1           default_hc23dcda_7    conda-forge
libnghttp2                1.47.0               he49606f_0    conda-forge
libnsl                    2.0.0                h7f98852_0    conda-forge
libopenblas               0.3.18          pthreads_h8fe5266_0    conda-forge
libpng                    1.6.37               h21135ba_2    conda-forge
libsanitizer              9.4.0               h79bfe98_16    conda-forge
libsodium                 1.0.18               h36c2ea0_1    conda-forge
libssh2                   1.10.0               ha35d2d1_2    conda-forge
libstdcxx-devel_linux-64  9.4.0               hd854feb_16    conda-forge
libstdcxx-ng              11.2.0              he4da1e4_14    conda-forge
libtiff                   4.3.0                h542a066_3    conda-forge
libuuid                   2.32.1            h7f98852_1000    conda-forge
libwebp                   1.2.2                h3452ae3_0    conda-forge
libwebp-base              1.2.2                h7f98852_1    conda-forge
libxcb                    1.13              h7f98852_1004    conda-forge
libxml2                   2.9.12               h885dcf4_1    conda-forge
libzlib                   1.2.11            h36c2ea0_1013    conda-forge
lifelines                 0.27.1             pyhd8ed1ab_0    conda-forge
llvmlite                  0.33.0           py37h5202443_1    conda-forge
loompy                    3.0.6                      py_0    conda-forge
lz4-c                     1.9.3                h9c3ff4c_1    conda-forge
lzo                       2.10              h516909a_1000    conda-forge
make                      4.3                  hd18ef5c_1    conda-forge
markupsafe                2.1.1            py37h540881e_1    conda-forge
matplotlib-base           3.5.1            py37h1058ff1_0    conda-forge
matplotlib-inline         0.1.3              pyhd8ed1ab_0    conda-forge
matplotlib-venn           0.11.6                   pypi_0    pypi
metis                     5.1.0             h58526e2_1006    conda-forge
mistune                   0.8.4           py37h5e8e339_1005    conda-forge
mkl                       2022.0.1           h06a4308_117  
mpfr                      4.1.0                h9202a9a_1    conda-forge
multicoretsne             0.1                      pypi_0    pypi
munkres                   1.1.4              pyh9f0ad1d_0    conda-forge
mygene                    3.2.2              pyh5e36f6f_0    bioconda
natsort                   8.1.0              pyhd8ed1ab_0    conda-forge
nbclassic                 0.3.7              pyhd8ed1ab_0    conda-forge
nbclient                  0.5.13                   pypi_0    pypi
nbconvert                 6.4.4                    pypi_0    pypi
nbconvert-core            6.5.0              pyhd8ed1ab_0    conda-forge
nbconvert-pandoc          6.5.0              pyhd8ed1ab_0    conda-forge
nbformat                  5.2.0                    pypi_0    pypi
ncurses                   6.3                  h9c3ff4c_0    conda-forge
nest-asyncio              1.5.4                    pypi_0    pypi
networkx                  2.6.3                    pypi_0    pypi
ninja                     1.10.2               h4bd325d_1    conda-forge
notebook                  6.4.10                   pypi_0    pypi
notebook-shim             0.1.0              pyhd8ed1ab_0    conda-forge
numba                     0.51.0rc1       np1.11py3.7h04863e7_g833c5907c_0    numba
numexpr                   2.8.1            py37hecfb737_0  
numpy                     1.21.5                   pypi_0    pypi
numpy_groupies            0.9.16             pyhd8ed1ab_0    conda-forge
openblas                  0.3.18          pthreads_h4748800_0    conda-forge
openjpeg                  2.4.0                hb52868f_1    conda-forge
openpyxl                  3.0.9              pyhd8ed1ab_0    conda-forge
openssl                   3.0.3                h166bdaf_0    conda-forge
opt-einsum                3.3.0                    pypi_0    pypi
oslom-runner              1.5                      pypi_0    pypi
packaging                 21.3               pyhd8ed1ab_0    conda-forge
palantir                  1.0.0                    pypi_0    pypi
pandas                    1.3.5            py37he8f5f7f_0    conda-forge
pandoc                    2.18                 ha770c72_0    conda-forge
pandocfilters             1.5.0              pyhd8ed1ab_0    conda-forge
pango                     1.48.10              h4dcc4a0_3    conda-forge
parso                     0.8.3              pyhd8ed1ab_0    conda-forge
pathlib                   1.0.1            py37h89c1867_6    conda-forge
patsy                     0.5.2              pyhd8ed1ab_0    conda-forge
pcre                      8.45                 h9c3ff4c_0    conda-forge
pcre2                     10.37                h032f7d1_0    conda-forge
pexpect                   4.8.0              pyh9f0ad1d_2    conda-forge
phenograph                1.5.7                    pypi_0    pypi
pickleshare               0.7.5                   py_1003    conda-forge
pillow                    9.0.1            py37h44f0d7a_2    conda-forge
pip                       22.0.4             pyhd8ed1ab_0    conda-forge
pixman                    0.40.0               h36c2ea0_0    conda-forge
plotly                    5.6.0                      py_0    plotly
pluggy                    1.0.0            py37h89c1867_2    conda-forge
progressbar2              4.0.0              pyhd8ed1ab_0    conda-forge
prometheus-client         0.13.1                   pypi_0    pypi
prometheus_client         0.14.1             pyhd8ed1ab_0    conda-forge
prompt-toolkit            3.0.28                   pypi_0    pypi
psutil                    5.9.0            py37h540881e_1    conda-forge
pthread-stubs             0.4               h36c2ea0_1001    conda-forge
ptyprocess                0.7.0              pyhd3deb0d_0    conda-forge
py                        1.11.0             pyh6c4a22f_0    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pydiffmap                 0.2.0.1                  pypi_0    pypi
pygam                     0.8.0                      py_0    conda-forge
pygments                  2.11.2                   pypi_0    pypi
pyopenssl                 22.0.0             pyhd8ed1ab_0    conda-forge
pyparsing                 3.0.7              pyhd8ed1ab_0    conda-forge
pyrsistent                0.18.1           py37h540881e_1    conda-forge
pysocks                   1.7.1            py37h89c1867_5    conda-forge
pytables                  3.7.0            py37h5dea08b_0    conda-forge
pytest                    7.1.0            py37h89c1867_0    conda-forge
python                    3.7.12          hf930737_100_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python-fastjsonschema     2.15.3             pyhd8ed1ab_0    conda-forge
python-igraph             0.9.9            py37h6c76e3a_0    conda-forge
python-tzdata             2022.1             pyhd8ed1ab_0    conda-forge
python-utils              3.2.2              pyhd8ed1ab_0    conda-forge
python_abi                3.7                     2_cp37m    conda-forge
pytorch                   1.4.0           py3.7_cuda10.1.243_cudnn7.6.3_0    pytorch
pytz                      2021.3             pyhd8ed1ab_0    conda-forge
pytz-deprecation-shim     0.1.0.post0      py37h89c1867_1    conda-forge
pyvis                     0.1.9                    pypi_0    pypi
pywavelets                1.3.0            py37hda87dfa_1    conda-forge
pyzmq                     22.3.0           py37h0c0c2a8_2    conda-forge
r-base                    4.1.2                hde4fec0_0    conda-forge
readline                  8.1                  h46c0cb4_0    conda-forge
requests                  2.27.1             pyhd8ed1ab_0    conda-forge
rpy2                      3.5.1           py37r41hda87dfa_0    conda-forge
scanpy                    1.8.2                    pypi_0    pypi
schpf                     0.5.0                    pypi_0    pypi
scikit-image              0.19.2           py37he8f5f7f_0    conda-forge
scikit-learn              1.0.2            py37hf9e9bfc_0    conda-forge
scikit-misc               0.1.4                    pypi_0    pypi
scipy                     1.7.3            py37hf2a6cf1_0    conda-forge
scvelo                    0.2.4              pyhdfd78af_0    bioconda
seaborn                   0.11.2               hd8ed1ab_0    conda-forge
seaborn-base              0.11.2             pyhd8ed1ab_0    conda-forge
sed                       4.8                  he412f7d_0    conda-forge
send2trash                1.8.0              pyhd8ed1ab_0    conda-forge
session-info              1.0.0              pyhd8ed1ab_0    conda-forge
setuptools                59.8.0           py37h89c1867_0    conda-forge
simplegeneric             0.8.1                      py_1    conda-forge
simplejson                3.17.6                   pypi_0    pypi
sinfo                     0.3.4                    pypi_0    pypi
six                       1.16.0             pyh6c4a22f_0    conda-forge
sklearn                   0.0                      pypi_0    pypi
slalom                    1.0.0.dev11              pypi_0    pypi
sniffio                   1.2.0            py37h89c1867_3    conda-forge
snowballstemmer           2.2.0              pyhd8ed1ab_0    conda-forge
soupsieve                 2.3.1              pyhd8ed1ab_0    conda-forge
sphinx                    4.5.0              pyh6c4a22f_0    conda-forge
sphinxcontrib-applehelp   1.0.2                      py_0    conda-forge
sphinxcontrib-devhelp     1.0.2                      py_0    conda-forge
sphinxcontrib-htmlhelp    2.0.0              pyhd8ed1ab_0    conda-forge
sphinxcontrib-jsmath      1.0.1                      py_0    conda-forge
sphinxcontrib-qthelp      1.0.3                      py_0    conda-forge
sphinxcontrib-serializinghtml 1.1.5              pyhd8ed1ab_2    conda-forge
sqlite                    3.37.1               h4ff8645_0    conda-forge
statsmodels               0.13.2           py37hb1e94ed_0    conda-forge
stdlib-list               0.8.0                    pypi_0    pypi
suitesparse               5.10.1               h9e50725_1    conda-forge
sysroot_linux-64          2.12                he073ed8_15    conda-forge
tbb                       2021.5.0             h4bd325d_0    conda-forge
tenacity                  8.0.1              pyhd8ed1ab_0    conda-forge
terminado                 0.13.3           py37h89c1867_1    conda-forge
testpath                  0.6.0                    pypi_0    pypi
texttable                 1.6.4              pyhd8ed1ab_0    conda-forge
threadpoolctl             3.1.0              pyh8a188c0_0    conda-forge
tifffile                  2019.7.26.2              py37_0    conda-forge
tinycss2                  1.1.1              pyhd8ed1ab_0    conda-forge
tk                        8.6.12               h27826a3_0    conda-forge
tktable                   2.10                 hb7b940f_3    conda-forge
tokenize-rt               4.2.1              pyhd8ed1ab_0    conda-forge
tomli                     2.0.1              pyhd8ed1ab_0    conda-forge
toolz                     0.11.2             pyhd8ed1ab_0    conda-forge
tornado                   6.1              py37h540881e_3    conda-forge
tqdm                      4.63.0                   pypi_0    pypi
traitlets                 5.1.1              pyhd8ed1ab_0    conda-forge
typing-extensions         4.1.1                hd8ed1ab_0    conda-forge
typing_extensions         4.1.1              pyha770c72_0    conda-forge
tzdata                    2022a                h191b570_0    conda-forge
tzlocal                   4.2              py37h89c1867_0    conda-forge
umap-learn                0.4.6                    pypi_0    pypi
unicodedata2              14.0.0           py37h5e8e339_0    conda-forge
urllib3                   1.26.9             pyhd8ed1ab_0    conda-forge
wcwidth                   0.2.5              pyh9f0ad1d_2    conda-forge
webencodings              0.5.1                    pypi_0    pypi
websocket-client          1.3.1                    pypi_0    pypi
wheel                     0.37.1             pyhd8ed1ab_0    conda-forge
wrapt                     1.14.1           py37h540881e_0    conda-forge
xlrd                      1.2.0                    pypi_0    pypi
xorg-kbproto              1.0.7             h7f98852_1002    conda-forge
xorg-libice               1.0.10               h7f98852_0    conda-forge
xorg-libsm                1.2.3             hd9c2040_1000    conda-forge
xorg-libx11               1.7.2                h7f98852_0    conda-forge
xorg-libxau               1.0.9                h7f98852_0    conda-forge
xorg-libxdmcp             1.1.3                h7f98852_0    conda-forge
xorg-libxext              1.3.4                h7f98852_1    conda-forge
xorg-libxrender           0.9.10            h7f98852_1003    conda-forge
xorg-libxt                1.2.1                h7f98852_2    conda-forge
xorg-renderproto          0.11.1            h7f98852_1002    conda-forge
xorg-xextproto            7.3.0             h7f98852_1002    conda-forge
xorg-xproto               7.0.31            h7f98852_1007    conda-forge
xz                        5.2.5                h516909a_1    conda-forge
zeromq                    4.3.4                h9c3ff4c_1    conda-forge
zipp                      3.7.0              pyhd8ed1ab_1    conda-forge
zlib                      1.2.11            h36c2ea0_1013    conda-forge
zstd                      1.5.2                ha95c52a_0    conda-forge
prete commented 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.