ML(Machine Learning) Workbench Model Service Developer Guide¶
1. Overview¶
This is the developers guide to ML Workbench Model Service.
1.1. What is ML Workbench Model Service?¶
ML Workbench Model Service expose API to allow to perform CRUD operation on Associated Models in ML Workbench.
2. Technology and Frameworks¶
List of the development languages, frameworks, etc.
- Springboot 2.1.7.RELEASE
- Java 11
- Maven 4.0.0
- Jackson 2.7.5
- JUnit 4.12
- LightCouch 0.2.0
3. Project Resources¶
- Gerrit repo: workbench/model-service
- Jira ML Workbench Model Mapping Service
4. Development Setup¶
Clone or download code from “Gerrit repo” mentioned above.
Import model-service Project in IDE (viz., Eclipse or STC)
Once successfully imported, set the required properties in application.properties file.
Run as Springboot application.
Access using Swagger UI : http://localhost:9091/mlWorkbench/v1/modelservice/swagger-ui.html#/
- Once you get the Swagger UI, click Authorize button and provide JWT token as below :
Bearer <JWT token for Acumos User>
Note: JWT token value can be obtained after successful login in Acumos.
After successfully setting Authorize value, API are available to access. Following are the sample inputs :
List out all the Models that belongs to user
“authenticatedUserId” : <Acumos User login Id>
List out all the Models that belongs to User under the Project
“authenticatedUserId” : <Acumos User login Id>
“projectId” : <Project UUID>
Associate’s the Model to the Project
“authenticatedUserId” : <Acumos User login Id>
“projectId” : <Project UUID>
“modelId” : <Model UUID>
- “model” :{
- “modelId”: {
- “versionId”: {
“label”: “1”
},
- “metrics”: {
- “kv”: [
- {
“key”: “MODEL_TYPE_CODE”,
“value”: “<XYZ>”
},
- {
“key”: “MODEL_PUBLISH_STATUS”,
“value”: “true”
},
- {
“key”: “CATALOG_NAMES”,
“value”: “xyz”
}
]
}
}
}
Update the Model Association with Project
“authenticatedUserId” : <Acumos User login Id>
“projectId” : <Project UUID>
“modelId” : <Model UUID>
- “model” :{
- “modelId”: {
- “versionId”: {
“label”: “1”
},
- “metrics”: {
- “kv”: [
- {
“key”: “MODEL_TYPE_CODE”,
“value”: “<XYZ>”
},
- {
“key”: “MODEL_PUBLISH_STATUS”,
“value”: “true”
},
- {
“key”: “CATALOG_NAMES”,
“value”: “xyz”
},
- {
“key”: “ASSOCIATION_ID”,
“value”: “<UUID>”
}
]
}
}
}
Delete the Model Association with Project in ML Workbench
“authenticatedUserId” : <Acumos User login Id>
“projectId” : <Project UUID>
“modelId” : <Model UUID>
- “model” :{
- “modelId”: {
- “versionId”: {
“label”: “1”
},
- “metrics”: {
- “kv”: [
- {
“key”: “MODEL_TYPE_CODE”,
“value”: “<XYZ>”
},
- {
“key”: “MODEL_PUBLISH_STATUS”,
“value”: “true”
},
- {
“key”: “CATALOG_NAMES”,
“value”: “xyz”
},
- {
“key”: “ASSOCIATION_ID”,
“value”: “<UUID>”
}
]
}
}
}