mirror of
https://github.com/microsoft/qlib.git
synced 2026-07-15 00:36:55 +08:00
Add dataset standalone usage example
This commit is contained in:
@@ -106,6 +106,11 @@ if __name__ == "__main__":
|
|||||||
model = init_instance_by_config(task["model"])
|
model = init_instance_by_config(task["model"])
|
||||||
dataset = init_instance_by_config(task["dataset"])
|
dataset = init_instance_by_config(task["dataset"])
|
||||||
|
|
||||||
|
# NOTE: This line is optional
|
||||||
|
# It demonstrates that the dataset can be used standalone.
|
||||||
|
example_df = dataset.prepare("train")
|
||||||
|
print(example_df.head())
|
||||||
|
|
||||||
# start exp
|
# start exp
|
||||||
with R.start(experiment_name="workflow"):
|
with R.start(experiment_name="workflow"):
|
||||||
R.log_params(**flatten_dict(task))
|
R.log_params(**flatten_dict(task))
|
||||||
|
|||||||
Reference in New Issue
Block a user