You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Provide a consistent .save interface for all models.
This .save method should save the model artifact along with the schema to a directory provided.
Motivation
Model artifacts alone are not enough to unambiguously infer the correct input schema for a model.
Saving the input schema along with models will enable serving code in systems to figure out the correct inputs required for models from an artifact without requiring the user to provide the schema at serving time.
@marcromeyn@oliverholworthy what's the status of this? This is blocking the creation of example notebooks for end to end using systems.
oliverholworthy
changed the title
[FEA] Save input schema when .save methods are called on models
[FEA] Save input and output schema when .save methods are called on models
Oct 5, 2022
There is a bit more to think about beyond this. Adding output schema for tensorflow models. And figuring out how to enforce that a schema is created. Since the Merlin Models API is flexible enough at the moment that we can't always guarantee that we have a schema available. At least not in a way that provides any more information than the saved model signature is able to (since we could infer the schema from the saved model like we do in Merlin Systems currently).
Relates to: NVIDIA-Merlin/Merlin#545
🚀 Feature request
Provide a consistent
.save
interface for all models.This
.save
method should save the model artifact along with the schema to a directory provided.Motivation
Model artifacts alone are not enough to unambiguously infer the correct input schema for a model.
Saving the input schema along with models will enable serving code in systems to figure out the correct inputs required for models from an artifact without requiring the user to provide the schema at serving time.
Part of: NVIDIA-Merlin/Merlin#489
Proposed interface
Create a runtime check-able protocol that specifies the common methods expected on a model object.
This
.save
method on a model will write out the model artifact(s) along with the input schema to a directory provided.Files saved in merlin metadata directory.
input_schema.json
andoutput_schema.json
). Serialized Merlin Schema using theTensorflowMetadata
format currently provided in merlin.coremodel.json
Saved model directory structure
merlin_metadata
subdirectory.e.g. a
model.save("my_merln_model")
on a tensorflow backend should result in the following directory structure:Sub-Tasks
The text was updated successfully, but these errors were encountered: