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

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Aug 9, 2023
1 parent 4f898a2 commit 0c799dd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/flash/text/classification/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ def load_data(
self.load_target_metadata(targets, target_formatter=target_formatter)

# If we had binary multi-class targets then we also know the labels (column names)
if hasattr(self, "target_formatter") and isinstance(self.target_formatter, MultiBinaryTargetFormatter) and isinstance(target_keys, List):
if (

Check warning on line 56 in src/flash/text/classification/input.py

View check run for this annotation

Codecov / codecov/patch

src/flash/text/classification/input.py#L56

Added line #L56 was not covered by tests
hasattr(self, "target_formatter")
and isinstance(self.target_formatter, MultiBinaryTargetFormatter)
and isinstance(target_keys, List)
):
self.labels = target_keys

# remove extra columns
Expand Down

0 comments on commit 0c799dd

Please sign in to comment.