Skip to content

Commit

Permalink
Add dataset standalone usage example
Browse files Browse the repository at this point in the history
  • Loading branch information
you-n-g committed Jan 20, 2021
1 parent d44c5bb commit fc81a39
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/workflow_by_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@
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))
Expand Down

0 comments on commit fc81a39

Please sign in to comment.