Closed jason-fries closed 3 years ago
I added some extra instructions to doc_src/source/setup.rst
, but the current instructions are not great. Ideally we could just run poetry install
once and wouldn't have to separately install PyTorch and embedding_dot
(poetry allows for adding GitHub repositories as dependencies), but there are issues with getting Poetry to play nicely with each:
pyproject.toml
as a dependency in a platform-agnostic way (for example, we would have to hard-code a specific PyTorch version with a CUDA version as a dependency, which would make ehr_ml
unusable if the machine doesn't have the exact CUDA version specified)setup.py
, but this sub-shell doesn't inherit packages from the environment from which the command was run (poetry add git+<github_link>
). The setup.py
in embedding_dot
imports PyTorch at the top, which causes the sub-shell install to fail since it doesn't have PyTorch. I tried this both with a fresh environment and my existing conda environment (which already had embedding_dot
installed!) to no avail. There might be some extra things I can do with the poetry virtualenv to fix this, but I'm still looking into this.There are a few existing GitHub issues / StackOverflow pages that confirm these are open issues that others are also experiencing:
poetry install
, but this still hard-codes specific versions of CUDA (https://github.com/python-poetry/poetry/issues/2613)pip install -e .
equivalent for GitHub repos appears to be a relatively new feature, but it doesn't address the issue of the sub-shell not inheriting dependencies for setup.py
itself from the parent environment (https://github.com/python-poetry/poetry/issues/34).This is now fixed.
The current instructions don't cover all the dependencies needed to run CLMBR, we're missing packages like torch, tqdm, etc. Let's add a requirements.txt (currently not include in the instructions at https://github.com/som-shahlab/ehr_ml/blob/master/doc_src/source/setup.rst) to handle full install process.