def persist_pipelines(pipelines):
Path('models').mkdir(exist_ok=True)
fp_fmt = 'models/{}-{:%y-%m-%d}.pkl'
now = dt.datetime.now()
for pipe in pipelines:
print(utils.pipeline_name(pipe))
fp_name = fp_fmt.format(utils.pipeline_name(pipe), now)
joblib.dump(pipe, fp_name)
# Pickle fails to work on RandomForestRegressor
# with open(fp_name, 'wb') as fp:
# pickle.dump(pipe, fp)
评论列表
文章目录