Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move dali preprocess to handler util #2485

Merged
merged 24 commits into from
Sep 9, 2023

Conversation

jagadeeshi2i
Copy link
Collaborator

@jagadeeshi2i jagadeeshi2i commented Jul 20, 2023

Description

Fixes #2332

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Feature/Issue validation/testing

Please describe the Unit or Integration tests that you ran to verify your changes and relevant result summary. Provide instructions so it can be reproduced.
Please also list any relevant details for your test configuration.

  • Test A
    Logs for Test A

  • Test B
    Logs for Test B

Checklist:

  • Did you have fun?
  • Have you added tests that prove your fix is effective or that this feature works?
  • Has code been commented, particularly in hard-to-understand areas?
  • Have you made corresponding changes to the documentation?

Signed-off-by: jagadeesh <jagadeeshj@ideas2it.com>
@jagadeeshi2i jagadeeshi2i requested a review from lxning July 20, 2023 18:55
@jagadeeshi2i
Copy link
Collaborator Author

@lxning reg Feature #2332, is the expectation is to

@codecov
Copy link

codecov bot commented Jul 20, 2023

Codecov Report

Merging #2485 (7dc96a4) into master (7253668) will decrease coverage by 1.84%.
The diff coverage is 0.00%.

❗ Current head 7dc96a4 differs from pull request most recent head 68d5712. Consider uploading reports for the commit 68d5712 to get more accurate results

@@            Coverage Diff             @@
##           master    #2485      +/-   ##
==========================================
- Coverage   72.71%   70.87%   -1.84%     
==========================================
  Files          79       83       +4     
  Lines        3742     3839      +97     
  Branches       58       58              
==========================================
  Hits         2721     2721              
- Misses       1017     1114      +97     
  Partials        4        4              
Files Changed Coverage Δ
...l-archiver/model_archiver/model_packaging_utils.py 92.30% <ø> (ø)
...ls/preprocess/built-in/dali_pipeline_generation.py 0.00% <0.00%> (ø)
ts/handler_utils/preprocess/dali.py 0.00% <0.00%> (ø)
ts/torch_handler/dali_handler.py 0.00% <0.00%> (ø)
ts/torch_handler/dali_image_classifier.py 0.00% <0.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

📢 Have feedback on the report? Share it here.

jagadeesh added 3 commits July 21, 2023 22:50
Signed-off-by: jagadeesh <jagadeeshj@ideas2it.com>
Signed-off-by: jagadeesh <jagadeeshj@ideas2it.com>
Signed-off-by: jagadeesh <jagadeeshj@ideas2it.com>
Copy link
Contributor

@chauhang chauhang left a comment

Choose a reason for hiding this comment

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

Please add steps for generating the "default.dali' built-in pipeline. We will need the build scripts for this and actual Dali pipeline creation code

@msaroufim
Copy link
Member

I think this looks reasonable, would really be much simpler to merge if we have a test though

jagadeesh added 2 commits July 24, 2023 22:11
Signed-off-by: jagadeesh <jagadeeshj@ideas2it.com>
Signed-off-by: jagadeesh <jagadeeshj@ideas2it.com>
Copy link
Collaborator

@agunapal agunapal left a comment

Choose a reason for hiding this comment

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

@jagadeeshi2i
Could you please add a pytest for this feature.

Signed-off-by: jagadeesh <jagadeeshj@ideas2it.com>
@jagadeeshi2i jagadeeshi2i changed the title [WIP] move dali preprocess to handler util move dali preprocess to handler util Jul 26, 2023
Copy link
Collaborator

@agunapal agunapal left a comment

Choose a reason for hiding this comment

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

@jagadeeshi2i Looks good overall.
Couple of points

  • Is there any reason for changing resnet to mnist
  • The args in builtin dali_pipeline_generation.py should be configurable
  • Can we re-use the pipeline in dali_pipeline_generation.py in the example.
    The current example is defining a new pipeline?
    Ex: for a simple image classifier model, users should be able to just use the default pipeline. Let me know your thoughts?

examples/nvidia_dali/README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@chauhang chauhang left a comment

Choose a reason for hiding this comment

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

@jagadeeshi2i Please add the documentation for how to compile the built in handler pipeline. This will need to be integrated with the torch build steps.

jagadeesh added 2 commits August 15, 2023 08:01
 - remove dali_image_segmenter handler

Signed-off-by: jagadeesh <jagadeeshj@ideas2it.com>
Signed-off-by: jagadeesh <jagadeeshj@ideas2it.com>
@jagadeeshi2i jagadeeshi2i added enhancement New feature or request preprocessing labels Aug 16, 2023
@jagadeeshi2i jagadeeshi2i changed the title move dali preprocess to handler util [WIP] move dali preprocess to handler util Aug 18, 2023
jagadeesh added 2 commits August 18, 2023 10:17
Signed-off-by: jagadeesh <jagadeeshj@ideas2it.com>
@jagadeeshi2i jagadeeshi2i changed the title [WIP] move dali preprocess to handler util move dali preprocess to handler util Aug 18, 2023
jagadeesh added 2 commits August 22, 2023 07:00
Signed-off-by: jagadeesh <jagadeeshj@ideas2it.com>
Signed-off-by: jagadeesh <jagadeeshj@ideas2it.com>
examples/nvidia_dali/README.md Outdated Show resolved Hide resolved
examples/nvidia_dali/README.md Show resolved Hide resolved
examples/nvidia_dali/README.md Outdated Show resolved Hide resolved
jagadeesh added 2 commits September 8, 2023 10:41
Signed-off-by: jagadeesh <jagadeeshj@ideas2it.com>
Signed-off-by: jagadeesh <jagadeeshj@ideas2it.com>
@jagadeeshi2i jagadeeshi2i added this pull request to the merge queue Sep 8, 2023
Copy link
Collaborator

@agunapal agunapal left a comment

Choose a reason for hiding this comment

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

ResNet example works by manually copying default.dali to the ta/handle_utils/built_in folder where torchserve is installed.

Approving to unblock.

Merged via the queue into pytorch:master with commit 8ae2f51 Sep 9, 2023
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request preprocessing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

optimize image preprocessing
4 participants