7.1 AI/ML model management
7.1.1 Overview
In this AI/ML model repository and deployment management feature, there are four new resource types suggested. For a CSE, there can be one or more <modelRepo> resource(s) for different services. The repository contains <mlModel> resources and each model contains an ML model and its meta data.
For an AE which represents an AIoT device (e.g. AI robot), AI service users can deploy model(s) to the device. To deploy models, a <modelDeploymentList> resource which works as the container of ML model deployments needs to be created first. A <modelDeployment> resource includes the IDs to the ML model, inference input and output resources. Multiple ML models can be deployed on an AIoT device which has one or more sensor(s) that provides inference input.

Figure 7.1.1-1: Resource tree structure for ML model management
Note
An alternative approach regarding the exising oneM2M device management capability is FFS.
7.1.2 Resource types
7.1.2.1 Resource Type modelRepo
The <modelRepo> resource represents a repository of ML models while each model is stored in a child <mlModel> resource. There can be more than one ML model repositories in a CSE for multiple ML-based services.
Table 7.1.2.1-1: Child resources of <modelRepo> resource
| Child Resources of <modelRepo> | Child Resource Type | Multiplicity | Description | <modelRepoAnnc> Child Resource Types |
|---|---|---|---|---|
| [variable] | <semanticDescriptor> | 0..n | See clause 9.6.30 [1] | <semanticDescriptor>, <semanticDescriptorAnnc> |
| [variable] | <subscription> | 0..n | See clause 9.6.8 [1] | <subscription> |
| [variable] | <mlModel> | 0..n | See clause 7.1.2.2 | <mlModelAnnc> |
| [variable] | <latest> | 1 | See clause 9.6.27 [1] | None |
| [variable] | <oldest> | 1 | See clause 9.6.28 [1] | None |
The <modelRepo> resource shall contain the attributes specified in table 7.1.2.1-2.
Table 7.1.2.1-2: Attributes of <modelRepo> resource
| Attributes of <modelRepo> |
Multiplicity | RW/ RO/ WO |
Description | <modelRepoAnnc> Attributes |
|---|---|---|---|---|
| resourceType | 1 | RO | See clause 9.6.1.3 [1] | NA |
| resourceID | 1 | RO | See clause 9.6.1.3 [1] | NA |
| resourceName | 1 | WO | See clause 9.6.1.3 [1] | NA |
| parentID | 1 | RO | See clause 9.6.1.3 [1] | NA |
| expirationTime | 1 | RW | See clause 9.6.1.3 [1] | MA |
| accessControlPolicyIDs | 0..1 (L) | RW | See clause 9.6.1.3 [1] | MA |
| labels | 0..1 (L) | RW | See clause 9.6.1.3 [1] | MA |
| creationTime | 1 | RO | See clause 9.6.1.3 [1] | NA |
| lastModifiedTime | 1 | RO | See clause 9.6.1.3 [1] | NA |
| announceTo | 0..1 (L) | RW | See clause 9.6.1.3 [1] | NA |
| announcedAttribute | 0..1 (L) | RW | See clause 9.6.1.3 [1] | NA |
| announceSyncType | 0..1 | RW | See clause 9.6.1.3 [1] | MA |
| dynamicAuthorizationConsultationIDs | 0..1 (L) | RW | See clause 9.6.1.3 [1] | OA |
| creator | 0..1 | RO | See clause 9.6.1.3 [1] | NA |
| custodian | 0..1 | RW | See clause 9.6.1.3 [1] | NA |
| currentNumberOfModels | 1 | RO | The current number of ML models in the repository. | OA |
| currentByteOfModels | 1 | RO | The current total byte size of ML models in the repository. | OA |
| maxNumberOfModels | 0..1 | RW | The maximum number of ML models which can be stored in the repository. | OA |
| maxByteOfModels | 0..1 | RW | The maximum byte size of ML models which can be stored in the repository. | OA |
7.1.2.2 Resource Type mlModel
The <mlModel> resource represents an ML model and is a child of a <modelRepo> resource.
Table 7.1.2.2-1: Child resources of <mlModel> resource
| Child Resources of <mlModel> | Child Resource Type | Multiplicity | Description | <mlModelAnnc> Child Resource Types |
|---|---|---|---|---|
| [variable] | <semanticDescriptor> | 0..n | See clause 9.6.30 [1] | <semanticDescriptor>, <semanticDescriptorAnnc> |
| [variable] | <subscription> | 0..n | See clause 9.6.8 [1] | <subscription> |
The <mlDatasetPolicy> resource shall contain the attributes specified in table 7.1.2.2-2.
Table 7.1.2.2-2: Attributes of <mlModel> resource
| Attributes of <mlModel> |
Multiplicity | RW/ RO/ WO |
Description | <mlModelAnnc> Attributes |
|---|---|---|---|---|
| resourceType | 1 | RO | See clause 9.6.1.3 [1] | NA |
| resourceID | 1 | RO | See clause 9.6.1.3 [1] | NA |
| resourceName | 1 | WO | See clause 9.6.1.3 [1] | NA |
| parentID | 1 | RO | See clause 9.6.1.3 [1] | NA |
| expirationTime | 1 | RW | See clause 9.6.1.3 [1] | MA |
| accessControlPolicyIDs | 0..1 (L) | RW | See clause 9.6.1.3 [1] | MA |
| labels | 0..1 (L) | RW | See clause 9.6.1.3 [1] | MA |
| creationTime | 1 | RO | See clause 9.6.1.3 [1] | NA |
| lastModifiedTime | 1 | RO | See clause 9.6.1.3 [1] | NA |
| announceTo | 0..1 (L) | RW | See clause 9.6.1.3 [1] | NA |
| announcedAttribute | 0..1 (L) | RW | See clause 9.6.1.3 [1] | NA |
| announceSyncType | 0..1 | RW | See clause 9.6.1.3 [1] | MA |
| dynamicAuthorizationConsultationIDs | 0..1 (L) | RW | See clause 9.6.1.3 [1] | OA |
| creator | 0..1 | RO | See clause 9.6.1.3 [1] | NA |
| custodian | 0..1 | RW | See clause 9.6.1.3 [1] | NA |
| name | 0..1 | RW | The human readable name of the ML model. | OA |
| version | 1 | RW | The version of the ML model. | OA |
| platform | 1 | RW | The ML platform that trained the model. (e.g. tensorFlow) | OA |
| mlType | 1 | RW | The type of ML algorithm (e.g. regression, classification). | OA |
| description | 0..1 | RW | The human readable description of the ML model. | OA |
| inputSample | 0..1 | RW | The sample data of inference input. | OA |
| outputSample | 0..1 | RW | The sample data of inference output. | OA |
| mlModel | 0..1 | RW | The Base 64 encodedbinary ML model. When a model consists more than one file, than the zipped file is stored in this attribute. This cannot be present with mlModelURL . | OA |
| mlModelSize | 0..1 | RO | The byte size of the ML model stored in mlModel . | OA |
| mlModelURL | 0..1 | RW | The URL of the ML model. This cannot be present with mlModel . | OA |
7.1.2.3 Resource Type modelDeploymentList
The <modelDeploymentList> resource represents the meta data of ML model deployements while each ML model deployment is respresented in a child <modelDeployment> resource. This resource can be created as a child of an <AE> resource which represents an IoT device, so the deployment list resouce can work as a list of remote ML model deployments.
Table 7.1.2.3-1: Child resources of <modelDeploymentList> resource
| Child Resources of <modelDeploymentList> | Child Resource Type | Multiplicity | Description | <modelDeploymentList> Child Resource Types |
|---|---|---|---|---|
| [variable] | <semanticDescriptor> | 0..n | See clause 9.6.30 [1] | <semanticDescriptor>, <semanticDescriptorAnnc> |
| [variable] | <subscription> | 0..n | See clause 9.6.8 [1] | <subscription> |
| [variable] | <modelDeployment> | 0..n | See 7.1.2.4 | <modelDeploymentAnnc> |
The <modelDeploymentList> resource shall contain the attributes specified in table 7.1.2.3-2.
Table 7.1.2.3-2: Attributes of <modelDeploymentList> resource
| Attributes of <modelDeploymentList> |
Multiplicity | RW/ RO/ WO |
Description | <modelDeploymentListAnnc> Attributes |
|---|---|---|---|---|
| resourceType | 1 | RO | See clause 9.6.1.3 [1] | NA |
| resourceID | 1 | RO | See clause 9.6.1.3 [1] | NA |
| resourceName | 1 | WO | See clause 9.6.1.3 [1] | NA |
| parentID | 1 | RO | See clause 9.6.1.3 [1] | NA |
| expirationTime | 1 | RW | See clause 9.6.1.3 [1] | MA |
| accessControlPolicyIDs | 0..1 (L) | RW | See clause 9.6.1.3 [1] | MA |
| labels | 0..1 (L) | RW | See clause 9.6.1.3 [1] | MA |
| creationTime | 1 | RO | See clause 9.6.1.3 [1] | NA |
| lastModifiedTime | 1 | RO | See clause 9.6.1.3 [1] | NA |
| announceTo | 0..1 (L) | RW | See clause 9.6.1.3 [1] | NA |
| announcedAttribute | 0..1 (L) | RW | See clause 9.6.1.3 [1] | NA |
| announceSyncType | 0..1 | RW | See clause 9.6.1.3 [1] | MA |
| dynamicAuthorizationConsultationIDs | 0..1 (L) | RW | See clause 9.6.1.3 [1] | OA |
| creator | 0..1 | RO | See clause 9.6.1.3 [1] | NA |
| custodian | 0..1 | RW | See clause 9.6.1.3 [1] | NA |
| numberOfDeployedModels | 1 | RO | The the number of ML models whose status is "deployed" among the models in this deployment list. | OA |
| numberOfRunningModels | 1 | RO | The the number of ML models whose status is "running" among the models in this deployment list. | OA |
| numberOfStoppedModels | 1 | RO | The the number of ML models whose status is "stopped" among the models in this deployment list. | OA |
7.1.2.4 Resource Type modelDeployment
The <modelDeployment> resource represents an ML model deployment. An ML AE (e.g. AIoT device) is expected to subscribe to the parent <modelDeploymentList> resource for the newly created <modelDeployment> resource. When the AE gets the new ML model deployment, it retrieves the ML model by the modelID attribute. Once the AE serves the model, then it gets the inference input by the inputResource and run the ML model. Then the AE stores the inference result into the resource indicated by the outputResource. A referred resource by inputResource and outputResource are aresource sharing resources (e.g. <container> resource).
Another AE can remotely manipulate the model status with the modelCommand attribute. It can run or stop the deployed model.
Table 7.1.2.4-1: Child resources of <modelDeployment> resource
| Child Resources of <modelDeployment> | Child Resource Type | Multiplicity | Description | <modelDeploymentAnnc> Child Resource Types |
|---|---|---|---|---|
| [variable] | <semanticDescriptor> | 0..n | See clause 9.6.30 [1] | <semanticDescriptor>, <semanticDescriptorAnnc> |
| [variable] | <subscription> | 0..n | See clause 9.6.8 [1] | <subscription> |
The <modelDeployment> resource shall contain the attributes specified in table 7.1.2.4-2.
Table 7.1.2.4-2: Attributes of <modelDeployment> resource
| Attributes of <modelDeployment> |
Multiplicity | RW/ RO/ WO |
Description | <modelDeploymentAnnc> Attributes |
|---|---|---|---|---|
| resourceType | 1 | RO | See clause 9.6.1.3 [1] | NA |
| resourceID | 1 | RO | See clause 9.6.1.3 [1] | NA |
| resourceName | 1 | WO | See clause 9.6.1.3 [1] | NA |
| parentID | 1 | RO | See clause 9.6.1.3 [1] | NA |
| expirationTime | 1 | RW | See clause 9.6.1.3 [1] | MA |
| accessControlPolicyIDs | 0..1 (L) | RW | See clause 9.6.1.3 [1] | MA |
| labels | 0..1 (L) | RW | See clause 9.6.1.3 [1] | MA |
| creationTime | 1 | RO | See clause 9.6.1.3 [1] | NA |
| lastModifiedTime | 1 | RO | See clause 9.6.1.3 [1] | NA |
| announceTo | 0..1 (L) | RW | See clause 9.6.1.3 [1] | NA |
| announcedAttribute | 0..1 (L) | RW | See clause 9.6.1.3 [1] | NA |
| announceSyncType | 0..1 | RW | See clause 9.6.1.3 [1] | MA |
| dynamicAuthorizationConsultationIDs | 0..1 (L) | RW | See clause 9.6.1.3 [1] | OA |
| creator | 0..1 | RO | See clause 9.6.1.3 [1] | NA |
| custodian | 0..1 | RW | See clause 9.6.1.3 [1] | NA |
| modelID | 1(L) | WO | The resource ID of the <mlModel> resource that is deployed. | OA |
| modelCommand | 1 | RW | This attribute is not returned in a response, but can be included in an Update request to update the modelStatus . Allowed values for an Update request is "run" and "stop". | NA |
| modelStatus | 1 | RO | The status of the deployed ML model which is "deployed", "running" or "stopped". The default is "deployed" |
OA |
| inputResource | 1 | RW | The resource ID of the inference input resource. | OA |
| outputResource | 1 | RW | The resource ID of the inference output. | OA |
7.1.3 Procedures
7.1.3.1 Procedures for <modelRepo>
No change from the CRUD procedures in clause 10.1 [1].
7.1.3.2 Procedures for <mlModel>
No change from the CRUD procedures in clause 10.1 [1].
7.1.3.3 Procedures for <modelDeploymentList>
No change from the CRUD procedures in clause 10.1 [1].
7.1.3.4 Procedures for <modelDeployment>
In a <modelDeployment> Update procedure, when the modelCommand attribute is included in the Update request, depending on the requested value, the Hosting CSE shall update the modelStatus attribute. The status value by default after the resource creation is “deployed”. For the start “run” and “stop” command, the status shall be updated as “running” and “stopped”, respectively. When the modelStatus attribute is updated, the Hosting CSE shall update the corresponding attributes (i.e. numberOfDeployedModels, numberOfRunningModels, numberOfStoppedModels) of a parent <modelDeploymentList> resource as well.
No change from the Create, Retrieve and Delete procedures in clause 10.1 [1].