-
Notifications
You must be signed in to change notification settings - Fork 1
AML-6 model manifest, tamper detection implementation #7
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some small comment improvements and what we discussed in Slack
…unction does not have a parameter; don't try to pass it one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah i think that's a good addition. still a few small changes i suggested in the docstring.
Would also love to run the tests and even add more to them but VSCode is being a pain in the head about my unittest framework and test discovery right now. So I'll conclude without that, but hope to resolve my local setup soon for future maintenance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like there are no more changes after my review yesterday, but I see your thumbs up on my latest comment and all our conversations are resolved. So great, let's get this party started then!
@@ -0,0 +1 @@ | |||
{"required_files": [{"name": "squeezenet", "source_uri": "data://AlgorithmiaSE/image_cassification_demo/squeezenet1_1-f364aa15.pth", "fail_on_tamper": true, "metadata": {"dataset_md5_checksum": "46a44d32d2c5c07f7f66324bef4c7266"}, "md5_checksum": "46a44d32d2c5c07f7f66324bef4c7266"}, {"name": "labels", "source_uri": "data://AlgorithmiaSE/image_cassification_demo/imagenet_class_index.json", "fail_on_tamper": true, "metadata": {"dataset_md5_checksum": "46a44d32d2c5c07f7f66324bef4c7266"}, "md5_checksum": "c2c37ea517e94d9795004a39431a14cb"}], "optional_files": [{"name": "mobilenet", "source_uri": "data://AlgorithmiaSE/image_cassification_demo/mobilenet_v2-b0353104.pth", "fail_on_tamper": false, "metadata": {"dataset_md5_checksum": "46a44d32d2c5c07f7f66324bef4c7266"}}], "timestamp": "1633450866.985464", "lock_checksum": "24f5eca888d87661ca6fc08042e40cb7"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we pretty print the freeze files instead of one long json line?
This is the first implementation of model file tamper detection, and model manifest integration into the developer environment.
This optional enhancement can be utilized by defining a
model_manifest.json
, which while utilizing the Python CLI; will freeze that manifest file into amanifest_file.json.freeze
which contains the md5 hashes of all model files that are currently defined in the manifest, along with a timestamp.This system allows for model files to automatically be downloaded safely and verified for security before they are even accessible to the algorithm developer; which they are available as a filehandle that they can then do whatever prep necessary.
A number of our customers have asked for this, and our implementation will improve over time.
To show an example of what an algorithm implementation might look like; take a look here:
https://gist.github.com/zeryx/d64140c385a9bda7aecfe42d3ce9bbff
the model_manifest.json would exist in the
root
directory, alongside thealgorithmia.conf
file. It would compiled into alock
file using thealgo compile
function defined in the following client PR (algorithmiaio/algorithmia-python#113), which is then to be checked in to the git repo.