Dutch Analytics - Xenia documentation

Models are objects within Xenia that serve a user's Python code. A model is a container that can receive requests to transform input data into output data. Examples are algorithms, data aggregation scripts and trained machine learning models.

The Python code that will run, as well as its requirements and artifacts are uploaded to Xenia in the form of a zipped model package (see: Model Structure ). Xenia will take care of containerizing your code and installing all its dependencies.

After the model is built in the background, it is ready to receive requests through its API endpoint. A model can also be connected to other models or data connectors in a Pipeline.

For a tutorial on deploying a model, see: Model deployment quickstart.


Model versions

Within one model, users can upload new versions of their processing code. Xenia builds a separate container for each model version, so in the background model versions are handled as separate entities and can be used as such. However, the input and output structure of the model will be maintained to ensure cross-compatibility between versions, so that they can easily be replaced when needed.


Creating a new model with the User Interface

A model can be created in the Xenia user interface by visiting Models in the left navigation bar and clicking on the CREATE button.

A model requires a name, an input type and an output type. The input type and output type can be structured or plain. See Model structure for more information.

The first version of your model can be created in the next step of the model creation form in the user interface. A default name v1 will be filled in, though feel free to name them as your team finds more convenient.

Fill in the programming language of your code. Click on the Upload code button to upload the ZIP file. The required structure of the ZIP file can be find here. For a concrete example of a model ready to be deployed, follow the steps in our quickstart.

More deployment options are optional, for example, the memory allocation. These can be set in the Advanced parameters.

Finally, click on the Create button.


Creating a new version of an existing model

Every model deployed in Xenia consists of one or more versions. Each version of the model can have different implementation, resource allocations or even programming language, however they must have identical input and output in order for them to be used interchangeably

When using the user interface, a first model version is created together with the model. You are able to add more model versions using Xenia's model versioning system.

In the left navigation bar, click on Models. Click on the model to which a new version will be added.

Then, click on the Create version button in the versions pane at the top left, of the pane. The version creation form will appear.

Fill in the version name and the programming language. Click on the Upload code button to upload the ZIP file for the new model version. The required structure of the ZIP file can be find here. More deployment options are optional, for example, the memory allocation. These can be set in the Advanced parameters.

Finally, click on the Create button to create the new version.

Updated 12 days ago

Models


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.