public interface ModelZoo
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getGroupId()
Returns the global unique identifier of the
ModelZoo. |
default ModelLoader<?,?> |
getModelLoader(java.lang.String name)
Returns the
ModelLoader based on the model name. |
default java.util.List<ModelLoader<?,?>> |
getModelLoaders()
Lists the available model families in the ModelZoo.
|
java.util.Set<java.lang.String> |
getSupportedEngines()
Returns all supported engine names.
|
static java.util.Map<Application,java.util.List<Artifact>> |
listModels()
Returns the available
Application and their model artifact metadata. |
static <I,O> ZooModel<I,O> |
loadModel(Criteria<I,O> criteria)
Gets the
ModelLoader based on the model name. |
java.lang.String getGroupId()
ModelZoo.
We recommend to use reverse DNS name as your model zoo group ID to make sure it's not conflict with other ModelZoos.
ModelZoodefault java.util.List<ModelLoader<?,?>> getModelLoaders()
default ModelLoader<?,?> getModelLoader(java.lang.String name)
ModelLoader based on the model name.name - the name of the modelModelLoader of the modeljava.util.Set<java.lang.String> getSupportedEngines()
static <I,O> ZooModel<I,O> loadModel(Criteria<I,O> criteria) throws java.io.IOException, ModelNotFoundException, MalformedModelException
ModelLoader based on the model name.I - the input data type for preprocessingO - the output data type after postprocessingcriteria - the name of the modeljava.io.IOException - for various exceptions loading data from the repositoryModelNotFoundException - if no model with the specified criteria is foundMalformedModelException - if the model data is malformedstatic java.util.Map<Application,java.util.List<Artifact>> listModels() throws java.io.IOException, ModelNotFoundException
Application and their model artifact metadata.Application and their model artifact metadatajava.io.IOException - if failed to download to repository metadataModelNotFoundException - if failed to parse repository metadata