From 8df1eb5e0b237f2e63a8e051e00c621ffaf73b8c Mon Sep 17 00:00:00 2001 From: Tim O'Donnell <timodonnell@gmail.com> Date: Fri, 20 Sep 2019 10:12:39 -0400 Subject: [PATCH] fix tests --- mhcflurry/class1_ligandome_predictor.py | 2 +- test/test_network_merging.py | 1 - test/test_speed.py | 8 ++++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/mhcflurry/class1_ligandome_predictor.py b/mhcflurry/class1_ligandome_predictor.py index 685f2083..2c32ad9d 100644 --- a/mhcflurry/class1_ligandome_predictor.py +++ b/mhcflurry/class1_ligandome_predictor.py @@ -150,7 +150,7 @@ class Class1LigandomePredictor(object): return network @staticmethod - def loss(y_true, y_pred, delta=0.2, alpha=None): + def loss(y_true, y_pred, sample_weight=None, delta=0.2, alpha=None): """ Loss function for ligandome prediction. """ diff --git a/test/test_network_merging.py b/test/test_network_merging.py index 31c63377..591d420f 100644 --- a/test/test_network_merging.py +++ b/test/test_network_merging.py @@ -10,7 +10,6 @@ from mhcflurry.downloads import get_path from mhcflurry.testing_utils import cleanup, startup - PAN_ALLELE_PREDICTOR = None diff --git a/test/test_speed.py b/test/test_speed.py index 3f75579b..037ae61c 100644 --- a/test/test_speed.py +++ b/test/test_speed.py @@ -22,11 +22,11 @@ from mhcflurry.testing_utils import cleanup, startup ALLELE_SPECIFIC_PREDICTOR = None -PAN_ALLELE_PREDICTOR_NO_MASS_SPEC = None +PAN_ALLELE_PREDICTOR = None def setup(): - global ALLELE_SPECIFIC_PREDICTOR, PAN_ALLELE_PREDICTOR_NO_MASS_SPEC + global ALLELE_SPECIFIC_PREDICTOR, PAN_ALLELE_PREDICTOR startup() ALLELE_SPECIFIC_PREDICTOR = Class1AffinityPredictor.load( get_path("models_class1", "models")) @@ -36,7 +36,7 @@ def setup(): def teardown(): - global ALLELE_SPECIFIC_PREDICTOR, PAN_ALLELE_PREDICTOR_NO_MASS_SPEC + global ALLELE_SPECIFIC_PREDICTOR, PAN_ALLELE_PREDICTOR ALLELE_SPECIFIC_PREDICTOR = None PAN_ALLELE_PREDICTOR = None cleanup() @@ -97,7 +97,7 @@ def test_speed_allele_specific(profile=False, num=DEFAULT_NUM_PREDICTIONS): def test_speed_pan_allele(profile=False, num=DEFAULT_NUM_PREDICTIONS): - global PAN_ALLELE_PREDICTOR_NO_MASS_SPEC + global PAN_ALLELE_PREDICTOR starts = collections.OrderedDict() timings = collections.OrderedDict() profilers = collections.OrderedDict() -- GitLab