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

add MHCFLURRY_DEFAULT_PREDICT_BATCH_SIZE environment variable

parent 6bf02c57
No related branches found
No related tags found
No related merge requests found
import time import time
import collections import collections
import logging
import json import json
import weakref import weakref
import itertools import itertools
import os
import logging
import numpy import numpy
import pandas import pandas
...@@ -17,6 +18,15 @@ from .custom_loss import get_loss ...@@ -17,6 +18,15 @@ from .custom_loss import get_loss
from .data_dependent_weights_initialization import lsuv_init from .data_dependent_weights_initialization import lsuv_init
DEFAULT_PREDICT_BATCH_SIZE = 4096
if os.environ.get("MHCFLURRY_DEFAULT_PREDICT_BATCH_SIZE"):
DEFAULT_PREDICT_BATCH_SIZE = os.environ[
"MHCFLURRY_DEFAULT_PREDICT_BATCH_SIZE"
]
logging.info(
"Configured default predict batch size: %d" % DEFAULT_PREDICT_BATCH_SIZE)
class Class1NeuralNetwork(object): class Class1NeuralNetwork(object):
""" """
Low level class I predictor consisting of a single neural network. Low level class I predictor consisting of a single neural network.
...@@ -1001,7 +1011,7 @@ class Class1NeuralNetwork(object): ...@@ -1001,7 +1011,7 @@ class Class1NeuralNetwork(object):
self, self,
peptides, peptides,
allele_encoding=None, allele_encoding=None,
batch_size=4096, batch_size=DEFAULT_PREDICT_BATCH_SIZE,
output_index=0): output_index=0):
""" """
Predict affinities. Predict affinities.
......
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