model_type = archive.config.get("model").get("type")
if model_type not in predictors:
raise ConfigurationError("no known predictor for model type {}".format(model_type))
return Predictor.from_archive(archive, predictors[model_type])
def _run(predictor: Predictor,
input_file: IO,
output_file: Optional[IO],
After Change
model_type = archive.config.get("model").get("type")
if model_type not in predictors:
raise ConfigurationError("no known predictor for model type {}".format(model_type))
predictor = Predictor.from_archive(archive, predictors[model_type])return predictor
def _run(predictor: Predictor,
input_file: IO,
output_file: Optional[IO],