Skip to content
Snippets Groups Projects
Commit 5cb3b145 authored by Tim O'Donnell's avatar Tim O'Donnell
Browse files

fix tests

parent 75a706f1
No related branches found
No related tags found
No related merge requests found
...@@ -150,7 +150,7 @@ class Class1LigandomePredictor(object): ...@@ -150,7 +150,7 @@ class Class1LigandomePredictor(object):
return network return network
@staticmethod @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. Loss function for ligandome prediction.
""" """
......
...@@ -10,7 +10,6 @@ from mhcflurry.downloads import get_path ...@@ -10,7 +10,6 @@ from mhcflurry.downloads import get_path
from mhcflurry.testing_utils import cleanup, startup from mhcflurry.testing_utils import cleanup, startup
PAN_ALLELE_PREDICTOR = None PAN_ALLELE_PREDICTOR = None
......
...@@ -22,11 +22,11 @@ from mhcflurry.testing_utils import cleanup, startup ...@@ -22,11 +22,11 @@ from mhcflurry.testing_utils import cleanup, startup
ALLELE_SPECIFIC_PREDICTOR = None ALLELE_SPECIFIC_PREDICTOR = None
PAN_ALLELE_PREDICTOR_NO_MASS_SPEC = None PAN_ALLELE_PREDICTOR = None
def setup(): def setup():
global ALLELE_SPECIFIC_PREDICTOR, PAN_ALLELE_PREDICTOR_NO_MASS_SPEC global ALLELE_SPECIFIC_PREDICTOR, PAN_ALLELE_PREDICTOR
startup() startup()
ALLELE_SPECIFIC_PREDICTOR = Class1AffinityPredictor.load( ALLELE_SPECIFIC_PREDICTOR = Class1AffinityPredictor.load(
get_path("models_class1", "models")) get_path("models_class1", "models"))
...@@ -36,7 +36,7 @@ def setup(): ...@@ -36,7 +36,7 @@ def setup():
def teardown(): def teardown():
global ALLELE_SPECIFIC_PREDICTOR, PAN_ALLELE_PREDICTOR_NO_MASS_SPEC global ALLELE_SPECIFIC_PREDICTOR, PAN_ALLELE_PREDICTOR
ALLELE_SPECIFIC_PREDICTOR = None ALLELE_SPECIFIC_PREDICTOR = None
PAN_ALLELE_PREDICTOR = None PAN_ALLELE_PREDICTOR = None
cleanup() cleanup()
...@@ -97,7 +97,7 @@ def test_speed_allele_specific(profile=False, num=DEFAULT_NUM_PREDICTIONS): ...@@ -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): 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() starts = collections.OrderedDict()
timings = collections.OrderedDict() timings = collections.OrderedDict()
profilers = collections.OrderedDict() profilers = collections.OrderedDict()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment