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

[3/N] Data sources - docs #272

Merged
merged 26 commits into from
May 11, 2021
Merged

[3/N] Data sources - docs #272

merged 26 commits into from
May 11, 2021

Conversation

ethanwharris
Copy link
Collaborator

@ethanwharris ethanwharris commented May 10, 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 🙃

@codecov
Copy link

codecov bot commented May 10, 2021

Codecov Report

Merging #272 (28c34c0) into master (e24aa62) will decrease coverage by 0.04%.
The diff coverage is 92.85%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #272      +/-   ##
==========================================
- Coverage   88.15%   88.11%   -0.05%     
==========================================
  Files          74       74              
  Lines        3564     3567       +3     
==========================================
+ Hits         3142     3143       +1     
- Misses        422      424       +2     
Flag Coverage Δ
unittests 88.11% <92.85%> (-0.05%) ⬇️

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

Impacted Files Coverage Δ
flash/data/callback.py 100.00% <ø> (ø)
flash/data/data_module.py 92.27% <ø> (ø)
flash/data/transforms.py 100.00% <ø> (ø)
flash/vision/classification/data.py 93.81% <ø> (-0.07%) ⬇️
flash/vision/segmentation/data.py 88.80% <ø> (ø)
flash/tabular/classification/data/data.py 90.83% <71.42%> (-1.35%) ⬇️
flash/data/auto_dataset.py 95.83% <100.00%> (ø)
flash/data/data_source.py 96.72% <100.00%> (ø)
flash/data/process.py 93.59% <100.00%> (-0.04%) ⬇️
flash/vision/detection/data.py 97.26% <100.00%> (ø)

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 e24aa62...28c34c0. Read the comment docs.

@ethanwharris ethanwharris changed the title [WIP] [2/N] Data sources - docs [2/N] Data sources - docs May 11, 2021
@ethanwharris ethanwharris marked this pull request as ready for review May 11, 2021 12:28
@ethanwharris ethanwharris changed the title [2/N] Data sources - docs [3/N] Data sources - docs May 11, 2021
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 overall !

Copy link
Contributor

@edgarriba edgarriba left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -37,80 +36,135 @@ def __init__(self, num_inputs, learning_rate=0.001, metrics=None):
learning_rate=learning_rate,
)

def training_step(self, batch: Any, batch_idx: int) -> Any:
return super().training_step(
(batch[DefaultDataKeys.INPUT], batch[DefaultDataKeys.TARGET]),
Copy link
Contributor

Choose a reason for hiding this comment

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

is there any way that in the user api we can use directly with strings to make it more clean and avoid to import the data keys class ? to look something like:

 (batch['input'], batch['target']),

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This isn't really the user API though. This doc is for best practices to create a new Task, and that would be using the DefaultDataKeys enum. Users of the tasks don't need to use the enum, but when creating new tasks they should be used.

@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 merged commit fb6402b into master May 11, 2021
@ethanwharris ethanwharris deleted the docs/data_sources branch May 11, 2021 13:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants