removed obsolete code

This commit is contained in:
Matthias Bisping 2022-03-29 19:54:14 +02:00
parent 06adedac57
commit d33a882d65
2 changed files with 0 additions and 20 deletions

View File

@ -7,4 +7,3 @@ CONFIG_FILE = path.join(PACKAGE_ROOT_DIR, "config.yaml")
DATA_DIR = path.join(PACKAGE_ROOT_DIR, "data") DATA_DIR = path.join(PACKAGE_ROOT_DIR, "data")
MLRUNS_DIR = path.join(DATA_DIR, "mlruns") MLRUNS_DIR = path.join(DATA_DIR, "mlruns")
BASE_WEIGHTS = path.join(DATA_DIR, "base_weights.h5")

View File

@ -1,19 +0,0 @@
from image_prediction.exceptions import UnknownModelLoader
from image_prediction.model_loader.loaders.mlflow import MlflowLoader
def get_mlflow_loader():
from image_prediction.locations import BASE_WEIGHTS
from image_prediction.config import CONFIG
loader = MlflowLoader(CONFIG.service.run_id)
loader._base_weights = BASE_WEIGHTS
return loader
def get_model_loader(loader_type: type):
if loader_type == MlflowLoader:
return get_mlflow_loader()
else:
raise UnknownModelLoader(f"No model loader for type {loader_type} was specified.")