Skip to content

Manual Definition of the Service Metamodel ​

In Asset -> Service we saw how to define Service Properties for the Service using the graphical interface. Behind the scenes, ALIDA converts what is entered interactively into a JSON metamodel. This JSON can also be defined manually and loaded from the UI.

To access the metamodel JSON editor, go to the Service registration panel and click on Service Definition

service-registration-form-with-json-service-definition-button-highlighted

The editor for entering the metamodel will open:

service-registration-json-service-definition-editor

AttributeDescription
nameUnique name of the Service
versionVersion of the Service
descriptionBrief textual description of the Service
urlThe URL of the Docker image of the Service, with the docker:// prefix and version tag.
Example: docker://dockerhub.alidalab.it/alida/restricted/services/great-expectations:1.1.0
accessLevelService visibility level
propertiesArray of property (the list of Service parameters and I/O ports)
markDownTextual documentation in markdown format associated with the Service and displayed in the UI

For the generic property, element of the properties array, the attributes are:

AttributeDescription
keyUnique identifier of the property. Used as a reference in code and in UI
descriptionDescriptive text displayed in UI
typeProperty type (application, resource, static). Determines the property behavior
mandatory*Indicates whether it is mandatory (true
defaultValueDefault value. Always string/number; JSON serialized as string
valueTypeType of expected value (STRING | INT | DOUBLE | BOOLEAN | JSON)
presetValuesArray's of generic data (depending on valueType) that must be selected on workflow editor
invisibleWhether to display or not the property in UI (true | false). true for input/output ports
modelAdditional info for Model ports (input-model, output-model). Declares the model format: { "format": "sklearn" }. Allowed values: sklearn, mlflow, huggingface. Do not declare id: it is automatically injected by ALIDA at runtime.
extraAdditional info for streaming ports: { "datasetType": null, "mode": "streaming" }. Mandatory to make the port Kafka-type; without it ALIDA provides Object Store references instead.

For more information visit Service Development > Service Registration

General JSON syntax for the metamodel

metamodel-in-ebnf