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

Data Pipeline V2: Cleanup #1018

Merged
merged 10 commits into from
Dec 2, 2021
Merged

Data Pipeline V2: Cleanup #1018

merged 10 commits into from
Dec 2, 2021

Conversation

tchaton
Copy link
Contributor

@tchaton tchaton commented Dec 1, 2021

What does this PR do?

Fixes # (issue)

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests? [not needed for typos/docs]
  • Did you verify new and existing tests pass locally with your changes?
  • If you made a notable change (that affects users), did you update the CHANGELOG?

PR review

  • Is this pull request ready for review? (if not, please submit in draft mode)

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃

@@ -94,3 +98,11 @@ def num_features(self):
n_cls_val = getattr(self.val_dataset, "num_features", None)
n_cls_test = getattr(self.test_dataset, "num_features", None)
return n_cls_train or n_cls_val or n_cls_test

from_folders = None
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ethanwharris Do we want to do this for now? Just an idea, but might not be worth it.

@@ -407,3 +412,80 @@ def from_fiftyone(
),
**data_module_kwargs,
)

@classmethod
def from_folders(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ethanwharris Not sure about those.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it 😃

@codecov
Copy link

codecov bot commented Dec 1, 2021

Codecov Report

Merging #1018 (a38ea32) into master (78c60ed) will decrease coverage by 6.04%.
The diff coverage is 84.52%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1018      +/-   ##
==========================================
- Coverage   87.73%   81.69%   -6.05%     
==========================================
  Files         254      254              
  Lines       13591    13655      +64     
==========================================
- Hits        11924    11155     -769     
- Misses       1667     2500     +833     
Flag Coverage Δ
unittests 81.69% <84.52%> (-6.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
flash/video/classification/data.py 81.33% <ø> (ø)
flash/image/classification/data.py 78.78% <46.66%> (-16.85%) ⬇️
flash/image/instance_segmentation/data.py 92.72% <85.71%> (+1.61%) ⬆️
flash/image/detection/data.py 94.44% <88.23%> (+0.58%) ⬆️
flash/image/keypoint_detection/data.py 93.61% <93.33%> (+2.18%) ⬆️
flash/core/integrations/icevision/data.py 93.18% <100.00%> (ø)
flash/core/model.py 86.57% <100.00%> (-1.38%) ⬇️
flash/core/utilities/flash_cli.py 93.57% <100.00%> (-0.68%) ⬇️
flash/graph/classification/data.py 95.23% <100.00%> (+1.29%) ⬆️
flash/image/instance_segmentation/cli.py 100.00% <100.00%> (ø)
... and 49 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 78c60ed...a38ea32. Read the comment docs.

Copy link
Collaborator

@ethanwharris ethanwharris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, some small comments. @tchaton I think you will also need to update the instance segmentation and keypoint detection (maybe object detection too) examples that use the current from_folders method to use the from_icedata method instead.

flash/image/detection/data.py Outdated Show resolved Hide resolved
@@ -407,3 +412,80 @@ def from_fiftyone(
),
**data_module_kwargs,
)

@classmethod
def from_folders(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it 😃

flash/image/detection/data.py Outdated Show resolved Hide resolved
flash/image/detection/data.py Outdated Show resolved Hide resolved
flash/image/detection/data.py Outdated Show resolved Hide resolved
@tchaton tchaton merged commit 9fac5e2 into master Dec 2, 2021
@tchaton tchaton deleted the cleanup_api branch December 2, 2021 12:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants