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

Docstrings for seq2seq data #1128

Merged
merged 9 commits into from
Jan 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

- Fixed a bug when loading prediction data for graph classification without targets ([#1121](https://github.com/PyTorchLightning/lightning-flash/pull/1121))

- Fixed a bug where loading Seq2Seq data for prediction would not work if the target field was not present ([#1128](https://github.com/PyTorchLightning/lightning-flash/pull/1128))

### Removed

- Removed the `Seq2SeqData` base class (use `TranslationData` or `SummarizationData` directly) ([#1128](https://github.com/PyTorchLightning/lightning-flash/pull/1128))

## [0.6.0] - 2021-13-12

### Added
Expand Down
1 change: 0 additions & 1 deletion docs/source/api/text.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ _______________
:template: classtemplate.rst

~seq2seq.core.model.Seq2SeqTask
~seq2seq.core.data.Seq2SeqData

seq2seq.core.input.Seq2SeqInputBase
seq2seq.core.input.Seq2SeqCSVInput
Expand Down
1 change: 0 additions & 1 deletion flash/text/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from flash.text.embedding import TextEmbedder # noqa: F401
from flash.text.question_answering import QuestionAnsweringData, QuestionAnsweringTask # noqa: F401
from flash.text.seq2seq import ( # noqa: F401
Seq2SeqData,
Seq2SeqTask,
SummarizationData,
SummarizationTask,
Expand Down
2 changes: 1 addition & 1 deletion flash/text/seq2seq/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from flash.text.seq2seq.core import Seq2SeqData, Seq2SeqTask # noqa: F401
from flash.text.seq2seq.core import Seq2SeqTask # noqa: F401
from flash.text.seq2seq.summarization import SummarizationData, SummarizationTask # noqa: F401
from flash.text.seq2seq.translation import TranslationData, TranslationTask # noqa: F401
1 change: 0 additions & 1 deletion flash/text/seq2seq/core/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
from flash.text.seq2seq.core.data import Seq2SeqData # noqa: F401
from flash.text.seq2seq.core.model import Seq2SeqTask # noqa: F401
300 changes: 0 additions & 300 deletions flash/text/seq2seq/core/data.py

This file was deleted.

2 changes: 1 addition & 1 deletion flash/text/seq2seq/core/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def load_data(
if input_key != DataKeys.INPUT:
hf_dataset = hf_dataset.rename_column(input_key, DataKeys.INPUT)

if target_key != DataKeys.TARGET:
if target_key in hf_dataset.column_names and target_key != DataKeys.TARGET:
hf_dataset = hf_dataset.rename_column(target_key, DataKeys.TARGET)

if flash._IS_TESTING:
Expand Down
480 changes: 477 additions & 3 deletions flash/text/seq2seq/summarization/data.py

Large diffs are not rendered by default.

478 changes: 475 additions & 3 deletions flash/text/seq2seq/translation/data.py

Large diffs are not rendered by default.