Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
fix doc string example in TranslationData (#221)
Browse files Browse the repository at this point in the history
* fix doc string example in TranslationData

* Fix docs build

Co-authored-by: Jirka Borovec <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Ethan Harris <[email protected]>
  • Loading branch information
4 people authored May 4, 2021
1 parent 54e569b commit ec404e8
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions flash/text/seq2seq/translation/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,14 @@ def from_files(
Examples::
train_df = pd.read_csv("train_data.csv")
tab_data = TabularData.from_df(train_df, target="fraud",
num_cols=["account_value"],
cat_cols=["account_type"])
datamodule = TranslationData.from_files(
train_file="data/wmt_en_ro/train.csv",
val_file="data/wmt_en_ro/valid.csv",
test_file="data/wmt_en_ro/test.csv",
input="input",
target="target",
batch_size=1,
)
"""
return super().from_files(
Expand Down

0 comments on commit ec404e8

Please sign in to comment.