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

Added MXNet Deployment Capability #390

Closed
wants to merge 0 commits into from

Conversation

chester-leung
Copy link
Member

Added capability to save/load and deploy MXNet models.
Added mxnet.py in clipper_admin/clipper_admin/deployers/ , mxnet_container.py in containers/python/ , and an integration test for MXNet. Also added necessary files to build a docker image from MXNet model.

Fixes: #364

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@dcrankshaw
Copy link
Contributor

jenkins ok to test

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Clipper-PRB/931/
Test FAILed.

Copy link
Contributor

@dcrankshaw dcrankshaw left a comment

Choose a reason for hiding this comment

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

This looks great. Just a couple minor comments.

Also, it looks like the tests failed because of the format checker. Run ./bin/format_code.sh to fix.


except Exception as e:
print(e)
logger.warn("Error saving MXNet model: %s" % e)
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be a logger.error().

# Deploy model
clipper_conn.build_and_deploy_model(name, version, input_type,
serialization_dir, base_image, labels,
registry, num_replicas)
Copy link
Contributor

Choose a reason for hiding this comment

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

Move lines 185-190 into the try block

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Clipper-PRB/941/
Test FAILed.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Clipper-PRB/942/
Test FAILed.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Clipper-PRB/943/
Test FAILed.

@dcrankshaw
Copy link
Contributor

@chester-leung for some reason bench_init.py has a formatting issue. Revert the change in that file and the format checker should pass.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Clipper-PRB/948/
Test FAILed.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Clipper-PRB/950/
Test FAILed.

@dcrankshaw
Copy link
Contributor

Hey sorry didn't mean to close this. Opened #404 to replace.

dcrankshaw pushed a commit that referenced this pull request Feb 16, 2018
* created virtual env and added supporting files for mxnet

* added venv to .gitignore

* Remove venv

* implemented serialization: save/load

* finished writing imxnet integration test

* testing integration test

* bind and fit model before saving

* Remove deps directory

* load model changed

* reformatted code

* removed duplicate code in clipper_admin/deployers/mxnet.py that was causing two models to register

* fixed model loading

* reformatted code

* deleted commented out old code

* Hopefully fixed formatting error

* bind/set params after loading serialized model instead of fitting. model deployment now requires user to specify input data shape

* removed cp train.data line in MXNetDockerfile

* uncommented build images in build_docker_images.sh

* updated variable name and added documentation for mxnet_input_shape in clipper_admin/clipper_admin/deployers/mxnet.py

* changed mxnet_input_shape parameter in deploy_mxnet_model() to mxnet_data_shapes. added documentation for mxnet_data_shapes parameter

* deleted unnecessary empty line from dockerfiles/ClipperTestDockerfile

* reformatted code

* changed description of mxnet_data_shapes in clipper_admin/clipper_admin/deployers/mxnet.py

* documentation changes in clipper_admin/clipper_admin/deployers/mxnet.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants