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

Remove model.predict #1030

Merged
merged 15 commits into from
Dec 6, 2021
Merged

Remove model.predict #1030

merged 15 commits into from
Dec 6, 2021

Conversation

ethanwharris
Copy link
Collaborator

@ethanwharris ethanwharris commented Dec 6, 2021

What does this PR do?

Fixes #1004

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 🙃

Copy link
Contributor

@tchaton tchaton left a comment

Choose a reason for hiding this comment

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

LGTM !

@@ -472,63 +470,6 @@ def test_step(self, batch: Any, batch_idx: int) -> None:
prog_bar=True,
)

@predict_context
def predict(
Copy link
Contributor

Choose a reason for hiding this comment

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

Love it !

) -> "FaceDetectionData":
return cls(
predict_dataset=ImageClassificationFilesInput(RunningStage.PREDICTING, predict_files),
input_transform=cls.input_transform_cls(predict_transform=predict_transform),
Copy link
Contributor

Choose a reason for hiding this comment

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

We will have to move those to the new API in a future PR. Just a reminder.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@ethanwharris ethanwharris changed the title [WIP] Remove model.predict Remove model.predict Dec 6, 2021
@ethanwharris ethanwharris marked this pull request as ready for review December 6, 2021 19:17
@codecov
Copy link

codecov bot commented Dec 6, 2021

Codecov Report

Merging #1030 (945c9c7) into master (d046de4) will decrease coverage by 0.02%.
The diff coverage is 64.28%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1030      +/-   ##
==========================================
- Coverage   87.12%   87.09%   -0.03%     
==========================================
  Files         254      254              
  Lines       13790    13778      -12     
==========================================
- Hits        12014    12000      -14     
- Misses       1776     1778       +2     
Flag Coverage Δ
unittests 87.09% <64.28%> (-0.03%) ⬇️

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

Impacted Files Coverage Δ
flash/image/face_detection/model.py 37.17% <0.00%> (ø)
flash/pointcloud/detection/open3d_ml/app.py 26.31% <0.00%> (-0.28%) ⬇️
flash/pointcloud/segmentation/open3d_ml/app.py 32.69% <0.00%> (-0.65%) ⬇️
flash/image/face_detection/data.py 53.62% <75.00%> (+2.06%) ⬆️
flash/pointcloud/segmentation/data.py 91.11% <75.00%> (-1.75%) ⬇️
flash/text/question_answering/data.py 86.83% <75.00%> (-0.20%) ⬇️
flash/text/seq2seq/core/data.py 90.00% <83.33%> (-0.31%) ⬇️
flash/core/integrations/labelstudio/visualizer.py 96.22% <100.00%> (+0.07%) ⬆️
flash/core/model.py 87.54% <100.00%> (-0.41%) ⬇️
flash/pointcloud/detection/data.py 81.57% <100.00%> (+2.16%) ⬆️
... and 4 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 d046de4...945c9c7. Read the comment docs.

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.

[RFC] Deprecate model.predict in favour of Trainer.predict
2 participants