Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pytorch to the conda environment #8094

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

asmirnov239
Copy link
Collaborator

This pull request updates the environment to include pytorch to gatk conda environment. This required an update to numpy and consequently updates of PyMC3 and its dependencies, as well as parts of gCNV code.

@gatk-bot
Copy link

Github actions tests reported job failures from actions build 3464982962
Failures in the following jobs:

Test Type JDK Job ID Logs
conda 8 3464982962.3 logs

@ldgauthier
Copy link
Contributor

Yes! I am so relieved to have all of this python dependency wrangling done. Perhaps not the sexiest work, but still very important -- thank you @asmirnov239 !

@samuelklee
Copy link
Contributor

Andrey is OOO, but maybe @lbergelson knows---is it expected that the CNN tests are failing (due to keras being missing)? I think I just need to get oriented about the order in which this and any other PRs (e.g., to replace or otherwise reorganize code for the CNN) are going to be merged.

Copy link
Contributor

@samuelklee samuelklee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @asmirnov239! Some proposed changes and questions, but otherwise looks really good! Hope it wasn't too painful messing with the dependencies, and thanks for going through the exercise.

I trust that you have or will run additional scientific/pipeline-level tests---might be good to document or summarize results here, as well!

@@ -0,0 +1,257 @@
@HD VN:1.6
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file was already added in #7889, correct?

@@ -341,7 +341,7 @@ def disengage(self):
def engage(self):
try:
all_converged = False
while self.i_epoch <= self.hybrid_inference_params.max_training_epochs:
while self.i_epoch <= self.hybrid_inference_params.max_training_epochs:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stray white space added?

- pytorch=1.10.1
- setuptools=59.5.0

# other python dependencies; these should be removed after functionality is moved into Java code
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If these lines weren't changed, perhaps restore their original location to minimize the diff?

- conda-forge::numpy=1.17.5 # do not update, this will break scipy=1.0.0
- conda-forge::mkl=2022.1.0 # MKL typically provides dramatic performance increases for theano, tensorflow, and other key dependencies
- conda-forge::mkl-service=2.4.0
- conda-forge::numpy=1.21.2 # do not update, this will break scipy=1.0.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment about scipy is out of date.

- conda-forge::scikit-learn=0.23.1
- conda-forge::matplotlib=3.2.1
- conda-forge::pandas=1.0.3
- conda-forge::typing_extensions=4.1.1 # see https://github.com/broadinstitute/gatk/issues/7800 and linked PRs

- pytorch=1.10.1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any notes about this package that you might want to include in a comment? Which channel is it pulled from, and is there a reason not to pin that?

@@ -70,6 +70,7 @@ ENV CLASSPATH /gatk/gatk.jar:$CLASSPATH
WORKDIR /gatk
RUN chmod -R a+rw /gatk
ENV PATH $CONDA_PATH/envs/gatk/bin:$CONDA_PATH/bin:$PATH
RUN conda update conda
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which version of conda do we end up with? Would it be more reproducible to just install that version directly in the base or pin it in some other way (is that possible here)?

rest.__init_group__(unseen_free_RVs)
self.groups.append(rest)
self.model = model

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe even out the white space here and below the following class.

op_kwargs={'temperature': temperature})
KLThermal, approx, None, temperature=temperature)

class DeterministicApproximation(Approximation):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments here about the determinism issues are definitely merited---summarize the problem in the original code and explain the fix here. Maybe also link the Slack thread---perhaps just on Github, rather than in code comments?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

model = modelcontext(model)
if not model.free_RVs:
raise TypeError('Model does not have FreeRVs')
self.groups = list()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious, is most of this code essentially borrowed from PyMC4 (as you referenced in the Slack thread above), or is it original?

@droazen
Copy link
Collaborator

droazen commented Nov 28, 2022

@samuelklee @asmirnov239 Yes, the CNN tests failing here is completely expected! What we should probably do for now is deprecate the CNN tools, and move the legacy conda environment into a separate yml file that you have to activate manually if you need to run the old CNN tools for some reason. Then once NVidia implements a training tool to go along with NVScoreVariants, we can remove the CNN tools completely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants