Crawford Collins
04/22/2020, 8:55 PMMetaModel
class in the flow it will be successful. If i try to load it in the flow will crash at fit_model
.
# meta = init_meta_model(problem, tinydb, use_default_models)
# ^^^ this does not work
meta = MetaModel(problem, tinydb, use_default_models=True)
model_path = get_models(meta)
fit_models = fit_model.map(
model_path=model_path,
train_data=unmapped(train_data),
target=unmapped(train_target),
problem=unmapped(problem),
)
###
@task
def init_meta_model(problem, db, use_default_models=True):
meta = MetaModel(problem, db, use_default_models=True)
return meta
@task
def fit_model(model_path, train_data, target, problem):
model = joblib.load(model_path)
model.fit(X=train_data, y=target)
joblib.dump(model, model_path)
MetaModel.models = ["PATH_TO_MODEL"]
nicholas
use_default_models
in init_meta_model
isn't initialized to True
as it is in other places, could that perhaps be the issue?