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

fix doc string example in TranslationData #221

Merged
13 changes: 8 additions & 5 deletions flash/text/seq2seq/translation/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,14 @@ def from_files(
TranslateData: The constructed data module.

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