From 2401d7b9a9d08176325d038c1c45e6c50713bb1e Mon Sep 17 00:00:00 2001 From: Tim O'Donnell <timodonnell@gmail.com> Date: Fri, 6 Sep 2019 19:49:10 -0400 Subject: [PATCH] attempted fix for travis tests --- mhcflurry/class1_neural_network.py | 1 + test/test_class1_neural_network.py | 4 ++-- test/test_released_predictors_well_correlated.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/mhcflurry/class1_neural_network.py b/mhcflurry/class1_neural_network.py index d75f66b7..86a0cdf5 100644 --- a/mhcflurry/class1_neural_network.py +++ b/mhcflurry/class1_neural_network.py @@ -1368,6 +1368,7 @@ class Class1NeuralNetwork(object): m is the length of the vectors used to represent amino acids """ from keras.models import clone_model + import keras.backend as K reshaped = allele_representations.reshape( (allele_representations.shape[0], -1)) original_model = self.network() diff --git a/test/test_class1_neural_network.py b/test/test_class1_neural_network.py index 0566b6a6..8baaded0 100644 --- a/test/test_class1_neural_network.py +++ b/test/test_class1_neural_network.py @@ -90,7 +90,7 @@ def test_inequalities(): hyperparameters = dict( peptide_amino_acid_encoding="one-hot", activation="tanh", - layer_sizes=[16], + layer_sizes=[64], max_epochs=200, minibatch_size=32, random_negative_rate=0.0, @@ -108,7 +108,7 @@ def test_inequalities(): loss="custom:mse_with_inequalities_and_multiple_outputs") df = pandas.DataFrame() - df["peptide"] = random_peptides(1000, length=9) + df["peptide"] = random_peptides(100, length=9) # First half are binders df["binder"] = df.index < len(df) / 2 diff --git a/test/test_released_predictors_well_correlated.py b/test/test_released_predictors_well_correlated.py index a6034b3e..395a6e80 100644 --- a/test/test_released_predictors_well_correlated.py +++ b/test/test_released_predictors_well_correlated.py @@ -23,7 +23,7 @@ PREDICTORS = { get_path("models_class1_pan", "models.with_mass_spec")) } -PREDICTORS["pan-allele"].optimize() +# PREDICTORS["pan-allele"].optimize() def test_correlation( -- GitLab