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

Add zip-store option to model-archiver tool #2196

Merged
merged 4 commits into from
Mar 28, 2023
Merged

Conversation

mreso
Copy link
Collaborator

@mreso mreso commented Mar 23, 2023

Description

This PR adds an option to our model-archiver tool to create a mar file without compression. This greatly speeds up the creation of the files which will enable us to reduce unit test time.

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

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.

  • pytest model-archiver/model_archiver/tests/
====================================================================== test session starts =======================================================================
platform linux -- Python 3.9.16, pytest-7.2.2, pluggy-1.0.0
rootdir: /home/ubuntu/serve/model-archiver
plugins: mock-3.10.0, cov-4.0.0
collected 29 items

model-archiver/model_archiver/tests/integ_tests/test_integration_model_archiver.py ...                                                                     [ 10%]
model-archiver/model_archiver/tests/unit_tests/test_model_packaging.py ....                                                                                [ 24%]
model-archiver/model_archiver/tests/unit_tests/test_model_packaging_utils.py .....................                                                         [ 96%]
model-archiver/model_archiver/tests/unit_tests/test_version.py .                                                                                           [100%]

======================================================================= 29 passed in 0.79s =======================================================================

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 Mar 23, 2023

Codecov Report

Merging #2196 (3e86c28) into master (d0510ba) will increase coverage by 0.25%.
The diff coverage is 100.00%.

❗ Current head 3e86c28 differs from pull request most recent head 88c1665. Consider uploading reports for the commit 88c1665 to get more accurate results

@@            Coverage Diff             @@
##           master    #2196      +/-   ##
==========================================
+ Coverage   71.32%   71.57%   +0.25%     
==========================================
  Files          73       73              
  Lines        3306     3307       +1     
  Branches       57       57              
==========================================
+ Hits         2358     2367       +9     
+ Misses        948      937      -11     
- Partials        0        3       +3     
Impacted Files Coverage Δ
...l-archiver/model_archiver/model_packaging_utils.py 60.13% <100.00%> (+5.52%) ⬆️

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

@mreso mreso marked this pull request as ready for review March 23, 2023 23:56
@mreso mreso changed the title [WIP] Add zip-store option to model-archiver tool Add zip-store option to model-archiver tool Mar 23, 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.

@mreso Looks good overall Can you please update this README with the new option and may be showing an example in the Readme? https://github.com/pytorch/serve/blob/master/model-archiver/README.md

@mreso
Copy link
Collaborator Author

mreso commented Mar 28, 2023

@mreso Looks good overall Can you please update this README with the new option and may be showing an example in the Readme? https://github.com/pytorch/serve/blob/master/model-archiver/README.md

Thanks @agunapal I have added the help text but stopped short of an example as use case is primarily testing

@mreso mreso requested a review from agunapal March 28, 2023 23:28
@mreso mreso merged commit afe8a9b into master Mar 28, 2023
@mreso mreso deleted the feature/zip_store_option branch March 28, 2023 23:59
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.

3 participants