Skip to main content
Version: 1.33

Repository requirements

Before adding a repository to Deeploy, the repository must meet certain requirements

beware

Repositories that do not meet the requirements outlined in this article will result in failed Deployments

Repository contract

In order to successfully create a Deployment from a Repository, the git repository needs to adhere to a certain format. We call this format the contract.

repository (or contract path)
|__ model
| |__ reference.json or model.<extension>
|
|__ explainer
|__ reference.json or explainer.<extension>

An example of the use of the Contract in a repository:

# this is the Contract as applied in example repository:
# https://gitlab.com/deeploy-ml/sample-models/iris-proba/-/tree/master/model

repository (or contract path)
|_ model
|_ model.bst

...

Combining multiple contracts in a single repository

It is also possible to have Deploy multiple models from a single Repository using contract paths.

Model folder

The model folder is mandatory and contains your (reference to the) machine learning model. If this folder is missing, attempting to create a Deployment from this Repository will result in failure.

For successful Deployment in Deeploy, you are expected to provide a model file that holds your trained model. To ensure compatibility, please refer to the Supported framework versions to determine the specific file type required for your chosen framework.

Caution

It is crucial that you have only one model file or reference named model.extension (i.e. if you use my_model.<extension>, your Deployment will fail)

Explainer Folder

The explainer folder provides an optional space to include an explainer for your model. To facilitate saving and loading explainers, we use the dill library. Hence, explainers typically follow the naming convention of explainer.dill. For all supported versions, please refer to Supported framework versions.

Caution

It is crucial that you have only one explainer file or reference named explainer.dill (i.e. if you use my_explainer.dill, your Deployment will fail)

Reference system and provenance

In cases where the size of individual files within a repository exceeds 100MB or the total size surpasses 1GB, we highly recommend using the reference system. By adopting the referencing system, the precise model is no longer stored in the git version history. To maintain a consistent level of provenance, it is essential to upload a fresh file to the blob and update your reference whenever you want to deploy a new version. Refrain from overwriting files within the blob system.

The reference system operates by replacing the contents of the ./model and ./explainer folders with a reference.json file, which serves as a reference to a folder stored in blob storage or a containerized model or explainer image. Deeploy currently offers support for AWS S3, Azure Blob Storage, and GCS (Google Cloud Storage). An example of a reference.json file:

# this reference is used in example repository:
# https://gitlab.com/deeploy-ml/sample-models/example-sklearn-census/-/tree/master/model
{
"reference": {
"blob": {
"url": "s3://deeploy-examples/sklearn/census/20220801171658/model"
}
}
}

If the reference system refers to a docker image, an example of the reference.json file looks as follows:

# this reference is used in example repository:
# ttps://gitlab.com/deeploy-ml/sample-models/example-custom-image-hello-world/
{
"reference": {
"docker": {
"image": "deeployml/example-custom-image-hello-world:0.3.0"
"port": 8080
}
}
}