Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a new compute type Kubernetes to MLC #12

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
{
"parameters": {
"subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
"resourceGroupName": "testrg123",
"workspaceName": "workspaces123",
"computeName": "compute123",
"api-version": "2021-07-01",
"parameters": {
"location": "eastus",
RichardZhaoW marked this conversation as resolved.
Show resolved Hide resolved
"properties": {
"description": "some compute",
"resourceId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2",
"computeType": "Kubernetes",
"properties": {
"namespace": "default",
"defaultInstanceType": "defaultInstanceType",
"instanceTypes": {
"defaultInstanceType": {
"nodeSelector": null,
"resources": {
"requests": {
"cpu": "1",
"memory": "4Gi",
"nvidia.com/gpu": null
},
"limits": {
"cpu": "1",
"memory": "4Gi",
"nvidia.com/gpu": null
}
}
}
}
}
}
}
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123",
"type": "Microsoft.MachineLearningServices/workspaces/computes",
"name": "compute123",
"location": "eastus",
"properties": {
"description": "some compute",
"resourceId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2",
"computeType": "Kubernetes",
"provisioningState": "Creating",
"properties": {
"relayConnectionString": null,
"serviceBusConnectionString": null,
"extensionPrincipalId": null,
"extensionInstanceReleaseTrain": "stable",
"vcName": null,
"namespace": "default",
"defaultInstanceType": "defaultInstanceType",
"instanceTypes": {
"defaultInstanceType": {
"nodeSelector": null,
"resources": {
"requests": {
"cpu": "1",
"memory": "4Gi",
"nvidia.com/gpu": null
},
"limits": {
"cpu": "1",
"memory": "4Gi",
"nvidia.com/gpu": null
}
}
}
}
}
}
}
},
"201": {
RichardZhaoW marked this conversation as resolved.
Show resolved Hide resolved
"body": {
"id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123",
"type": "Microsoft.MachineLearningServices/workspaces/computes",
"name": "compute123",
"location": "eastus",
"properties": {
"description": "some compute",
"resourceId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2",
"computeType": "Kubernetes",
"provisioningState": "Creating",
"properties": {
"relayConnectionString": null,
"serviceBusConnectionString": null,
"extensionPrincipalId": null,
"extensionInstanceReleaseTrain": "stable",
"vcName": null,
"namespace": "default",
"defaultInstanceType": "defaultInstanceType",
"instanceTypes": {
"defaultInstanceType": {
"nodeSelector": null,
"resources": {
"requests": {
"cpu": "1",
"memory": "4Gi",
"nvidia.com/gpu": null
},
"limits": {
"cpu": "1",
"memory": "4Gi",
"nvidia.com/gpu": null
}
}
}
}
}
}
},
"headers": {
"Azure-AsyncOperation": "https://management.azure.com/subscriptions/...pathToOperationStatus..."
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"parameters": {
"subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
"resourceGroupName": "testrg123",
"workspaceName": "workspaces123",
"computeName": "compute123",
"api-version": "2021-07-01"
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123",
"type": "Microsoft.MachineLearningServices/workspaces/computes",
"name": "compute123",
"location": "eastus",
"properties": {
"createdOn": "2021-04-01T22:00:00.0000000+00:00",
"modifiedOn": "2021-04-01T22:00:00.0000000+00:00",
"description": "some compute",
"resourceId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2",
"computeType": "Kubernetes",
"provisioningState": "Succeeded",
"isAttachedCompute": true,
"properties": {
"relayConnectionString": null,
"serviceBusConnectionString": null,
"extensionPrincipalId": null,
"extensionInstanceReleaseTrain": "stable",
"vcName": null,
"namespace": "default",
"defaultInstanceType": "defaultInstanceType",
"instanceTypes": {
"defaultInstanceType": {
"nodeSelector": null,
"resources": {
"requests": {
"cpu": "1",
"memory": "4Gi",
"nvidia.com/gpu": null
},
"limits": {
"cpu": "1",
"memory": "4Gi",
"nvidia.com/gpu": null
}
}
}
}
}
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,9 @@
},
"Get an ComputeInstance": {
"$ref": "./examples/Compute/get/ComputeInstance.json"
},
"Get a Kubernetes Compute": {
"$ref": "./examples/Compute/get/KubernetesCompute.json"
}
},
"parameters": [
Expand Down Expand Up @@ -798,7 +801,7 @@
"Create an ComputeInstance Compute": {
"$ref": "./examples/Compute/createOrUpdate/ComputeInstance.json"
},
"Create AKS Compute": {
"Create an AKS Compute": {
"$ref": "./examples/Compute/createOrUpdate/BasicAKSCompute.json"
},
"Create a DataFactory Compute": {
Expand All @@ -807,8 +810,11 @@
"Update a AML Compute": {
"$ref": "./examples/Compute/createOrUpdate/AmlCompute.json"
},
"Update a AKS Compute": {
"Update an AKS Compute": {
"$ref": "./examples/Compute/createOrUpdate/AKSCompute.json"
},
"Attach a Kubernetes Compute": {
"$ref": "./examples/Compute/createOrUpdate/KubernetesCompute.json"
}
},
"parameters": [
Expand Down Expand Up @@ -3127,6 +3133,67 @@
],
"x-ms-discriminator-value": "AKS"
},
"Kubernetes": {
"description": "A Machine Learning compute based on Kubernetes Compute.",
"allOf": [
{
"$ref": "#/definitions/Compute"
},
{
"type": "object",
"properties": {
"properties": {
"$ref": "#/definitions/KubernetesProperties"
}
}
}
],
"x-ms-discriminator-value": "Kubernetes"
},

"KubernetesProperties": {
"type": "object",
"description": "Kubernetes properties",
"properties": {
"relayConnectionString": {
"description": "Relay connection string.",
"type": "string"
},
"serviceBusConnectionString": {
"description": "ServiceBus connection string.",
"type": "string"
},
"extensionPrincipalId": {
RichardZhaoW marked this conversation as resolved.
Show resolved Hide resolved
"description": "Extension principal-id.",
"type": "string"
},
"extensionInstanceReleaseTrain": {
"description": "Extension instance release train.",
"type": "string"
},
"vcName": {
"description": "VC name.",
"type": "string"
},
"namespace": {
"description": "namespace",
"type": "string",
"default": "default"
},
"defaultInstanceType": {
"description": "Default instance type",
"type": "string"
},
"instanceTypes": {
"description": "Instance Type Schema",
"type": "object",
"additionalProperties":{
"$ref": "#/definitions/InstanceTypeSchema"
}
}
}
},

"AmlComputeProperties": {
"type": "object",
"description": "AML Compute properties",
Expand Down Expand Up @@ -3972,6 +4039,7 @@
"description": "The type of compute",
"enum": [
"AKS",
"Kubernetes",
"AmlCompute",
"ComputeInstance",
"DataFactory",
Expand Down Expand Up @@ -4752,7 +4820,7 @@
}
}
},
"AKSProperties": {
"SynapseAKSProperties": {
RichardZhaoW marked this conversation as resolved.
Show resolved Hide resolved
"type": "object",
"description": "AKS properties",
"properties": {
Expand Down Expand Up @@ -4799,14 +4867,60 @@
}
}
},
"InstanceTypeSchema": {
RichardZhaoW marked this conversation as resolved.
Show resolved Hide resolved
"type": "object",
"description": "Instance type schema.",
"additionalProperties": false,
"properties": {
"nodeSelector": {
"type": "object",
"description": "NodeSelector",
"additionalProperties": {
"type": "string"
}
},
"resources": {
RichardZhaoW marked this conversation as resolved.
Show resolved Hide resolved
"type": "object",
"additionalProperties": false,
"description": "Resource requests/limits for this instance type",
"properties": {
"requests": {
"$ref": "#/definitions/InstanceResourceSchema"
},
"limits": {
"$ref": "#/definitions/InstanceResourceSchema"
}
}
}
}
},
"InstanceResourceSchema": {
"type": "object",
"description": "Resource requests/limits for this instance type",
"properties":{
"cpu": {
"type": "string",
RichardZhaoW marked this conversation as resolved.
Show resolved Hide resolved
"description": "Number of vCPUs requested for this instance type"
},
"memory": {
"type": "string",
RichardZhaoW marked this conversation as resolved.
Show resolved Hide resolved
"description": "Memory size requested for this instance type"
},
"nvidia.com/gpu": {
"type": "string",
"description": "Number of Nvidia GPU cards requested for this instance_type"
}
}
},
"SynapseSparkPoolProperties": {
"type": "object",
"description": "Properties specific to Synapse Spark pools.",
"properties": {
"properties": {
"$ref": "#/definitions/AKSProperties"
"$ref": "#/definitions/SynapseAKSProperties"
}
}
}
}
}