cache loaded pipeline & disable tqdm output by default
This commit is contained in:
parent
b5dc5aa777
commit
d239368d70
@ -1,7 +1,6 @@
|
||||
import os
|
||||
from functools import partial
|
||||
from functools import lru_cache, partial
|
||||
from itertools import chain, tee
|
||||
from typing import Iterable
|
||||
|
||||
from funcy import rcompose, first, compose, second, chunks, identity, rpartial
|
||||
from tqdm import tqdm
|
||||
@ -20,6 +19,7 @@ from image_prediction.utils.generic import lift, starlift
|
||||
os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3"
|
||||
|
||||
|
||||
@lru_cache(maxsize=None)
|
||||
def load_pipeline(**kwargs):
|
||||
model_loader = get_mlflow_model_loader(MLRUNS_DIR)
|
||||
model_identifier = CONFIG.service.mlflow_run_id
|
||||
@ -38,7 +38,7 @@ def star(f):
|
||||
|
||||
|
||||
class Pipeline:
|
||||
def __init__(self, model_loader, model_identifier, batch_size=16, verbose=True, **kwargs):
|
||||
def __init__(self, model_loader, model_identifier, batch_size=16, verbose=False, **kwargs):
|
||||
self.verbose = verbose
|
||||
|
||||
extract = get_extractor(**kwargs)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user