This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if path is None: | |
# use an intelligent guess if it's not defined | |
def_path = op.realpath(op.join(op.dirname(__file__), | |
'..', '..', 'examples')) | |
path='' | |
#path = get_config(key, def_path) | |
# use the same for all datasets | |
if not os.path.exists(path): | |
try: | |
os.mkdir(def_path) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from multiprocessing import Process, Pool, Queue | |
from time import sleep | |
class Predictor(Process): | |
"""it wraps your prediction object.""" | |
def __init__(self, args, model_filepath): | |
"""intialize the super class and load the model from the pickle file.""" | |
# intialize the super class. | |
super(Predictor, self).__init__(args=args) |