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

Ensure that self.manifest is defined before call profiler #2488

Merged
merged 7 commits into from
Jul 22, 2023

Conversation

pedrogengo
Copy link
Contributor

Description

Fixes #2480

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • This change requires a documentation update

Feature/Issue validation/testing

  • Unit test added for base handler, where I set the self.manifest as None, imagining a scenario where someone created a custom initialize method and didn't defined self.manifest, and validate if we can run _infer_with_profiler even in this case.

    • Before the change:
      image

    • After the change
      image

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?

@codecov
Copy link

codecov bot commented Jul 21, 2023

Codecov Report

Merging #2488 (da7ca78) into master (e767afe) will increase coverage by 0.75%.
The diff coverage is 100.00%.

❗ Current head da7ca78 differs from pull request most recent head 307cf99. Consider uploading reports for the commit 307cf99 to get more accurate results

@@            Coverage Diff             @@
##           master    #2488      +/-   ##
==========================================
+ Coverage   71.90%   72.66%   +0.75%     
==========================================
  Files          78       78              
  Lines        3659     3669      +10     
  Branches       58       58              
==========================================
+ Hits         2631     2666      +35     
+ Misses       1024      999      -25     
  Partials        4        4              
Impacted Files Coverage Δ
ts/torch_handler/base_handler.py 68.51% <100.00%> (+11.97%) ⬆️
ts/torch_handler/unit_tests/test_base_handler.py 100.00% <100.00%> (ø)

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

@agunapal agunapal self-requested a review July 21, 2023 18:25
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.

Thanks for your contribution! LGTM

@agunapal agunapal requested a review from msaroufim July 21, 2023 18:45
@pedrogengo
Copy link
Contributor Author

Tks! I will just fix the lint issue and commit again

@msaroufim msaroufim merged commit 48fe78f into pytorch:master Jul 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Read manifest inside _infer_with_profiler method
3 participants