Skip to content
This repository has been archived by the owner on Sep 29, 2023. It is now read-only.

Add requirements.txt to install instructions #9

Closed
jason-fries opened this issue May 7, 2021 · 2 comments
Closed

Add requirements.txt to install instructions #9

jason-fries opened this issue May 7, 2021 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@jason-fries
Copy link
Contributor

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.

@jason-fries jason-fries added the bug Something isn't working label May 7, 2021
@woffett
Copy link
Contributor

woffett commented May 7, 2021

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:

  • Poetry doesn't allow for different downloads depending on CUDA version. This makes it difficult to include PyTorch in 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)
  • Poetry installs GitHub dependencies by allocating a temporary sub-shell to run the repository's 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:

@EthanSteinberg
Copy link
Contributor

This is now fixed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants