1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-03 19:10:58 +08:00

Add model saving for qrun and workflow example

This commit is contained in:
Jactus
2021-02-07 10:06:33 +08:00
committed by you-n-g
parent 07b905c153
commit c948385e76
2 changed files with 2 additions and 0 deletions

View File

@@ -112,6 +112,7 @@ if __name__ == "__main__":
with R.start(experiment_name="workflow"):
R.log_params(**flatten_dict(task))
model.fit(dataset)
R.save_objects(**{"params.pkl": model})
# prediction
recorder = R.get_recorder()

View File

@@ -26,6 +26,7 @@ def task_train(task_config: dict, experiment_name):
R.log_params(**flatten_dict(task_config))
model.fit(dataset)
recorder = R.get_recorder()
R.save_objects(**{"params.pkl": model})
# generate records: prediction, backtest, and analysis
for record in task_config["record"]: