From fc81a393170306d508329f8d44b0b588c5d9ca9c Mon Sep 17 00:00:00 2001 From: Young Date: Wed, 20 Jan 2021 11:33:29 +0000 Subject: [PATCH] Add dataset standalone usage example --- examples/workflow_by_code.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/workflow_by_code.py b/examples/workflow_by_code.py index b8cf3f935..ea9c70083 100644 --- a/examples/workflow_by_code.py +++ b/examples/workflow_by_code.py @@ -106,6 +106,11 @@ if __name__ == "__main__": model = init_instance_by_config(task["model"]) 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 with R.start(experiment_name="workflow"): R.log_params(**flatten_dict(task))