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

Issue 1064 #1140

Merged
merged 42 commits into from
Jul 14, 2021
Merged

Issue 1064 #1140

merged 42 commits into from
Jul 14, 2021

Conversation

lxning
Copy link
Collaborator

@lxning lxning commented Jun 24, 2021

Description

Please include a summary of the feature or issue being fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes #(issue)
#1064

Type of change

Please delete options that are not relevant.

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

Feature/Issue validation/testing

Please describe the tests [UT/IT] that you ran to verify your changes and relevent result summary. Provide instructions so it can be reproduced.
Please also list any relevant details for your test configuration.

Checklist:

  • Have you added tests that prove your fix is effective or that this feature works?
  • New and existing unit tests pass locally with these changes?
  • Has code been commented, particularly in hard-to-understand areas?
  • Have you made corresponding changes to the documentation?

Code changes description:

  • model gen automation
  1. ts_scripts/marsgen.py
  2. ts_scripts/mar_config.json
  • sanity test
  1. ts_scripts/sanity_utils.py
  2. ts_scripts/tsutils.py
  • regression test
  1. ts_scripts/regression_utils.py
  • postman
  1. test/postman/*
  • grpc
  1. ts_scripts/torchserve_grpc_client.py
  • pytest
  1. test/pytest/*
  • doc
  1. test/data_file_config.md

@lxning lxning added this to the v0.4.1 milestone Jun 24, 2021
@lxning lxning self-assigned this Jun 24, 2021
@lxning lxning added the enhancement New feature or request label Jun 25, 2021
Copy link
Collaborator

@HamidShojanazeri HamidShojanazeri left a comment

Choose a reason for hiding this comment

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

Thanks @lxning , I could successfully test it, here are the regression logs for reference. Please refer to in-line comments.

@@ -32,7 +32,7 @@
"tolerance":5
},
{
"url":"https://torchserve.pytorch.org/mar_files/squeezenet1_1.mar",
"url":"{{mar_path_squeezenet1_1}}",
Copy link
Collaborator

Choose a reason for hiding this comment

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

@lxning seems the PR handles the mar creation for eager mode only at this stage?
Is the reason for the text_classification not being auto generated related to training step required prior to archiving the model?

This seems to be the same case with Bert mar file as well?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

text_classification has issue with PT1.9 so it is not handled at here.

@@ -2,7 +2,7 @@ Use following properties to add inference test case in inference_data.json

Mandatory properties
----
**url:** Model url.
**url:** Model url or a varialbe {{mar_path_xxxx}} defined in environment.json. xxxx is replaced with model name. This model's mar file is generated by ts_scripts/marsgen.py via ts_scripts/mar_config.json.
Copy link
Collaborator

Choose a reason for hiding this comment

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

@lxning it would be helpful to add an example for {{mar_path_xxxx}}, is the first part getting used to recognize the variable "mar_path"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

mar_path is the key used for identifying local mar or remote url. "mar_path_xxxx" is used in environment.json. Pls check.

@@ -104,7 +102,10 @@ def test_sanity():
model_handler = model["handler"]

# Run gRPC sanity
register_model_grpc_cmd = f"python ts_scripts/torchserve_grpc_client.py register {model_name}"
print("pass mg.mar_set=", mg.mar_set)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: this perhaps needs to be cleaned up

if mar_set_str:
mar_set = set(mar_set_str.split(','))
marfile = f"{model_name}.mar"
print(f"## Check {marfile} in mar_set :", mar_set)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: can be cleaned up

@lxning lxning merged commit 3196b43 into master Jul 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants