Comment revise
"## Attach existing CMAKSCompute"
]
},
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Just replace the compute_name with your own aks name"
+ ]
+ },
{
"cell_type": "code",
"execution_count": null,
"from azureml.contrib.core.compute.cmakscompute import CmAksCompute\n",
"\n",
"# choose a name for your CMAKS compute\n",
- "compute_name = 'cmakstestgpu2'\n",
+ "compute_name = 'cmaks0518'\n",
"compute_target = ComputeTarget(workspace=ws, name=compute_name)"
]
},
"The Azure ML SDK's PyTorch estimator enables you to easily submit PyTorch training jobs for both single-node and distributed runs. For more information on the PyTorch estimator, refer [here](https://docs.microsoft.com/azure/machine-learning/service/how-to-train-pytorch)."
]
},
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {},
- "outputs": [],
- "source": [
- "from azureml.core.compute import ComputeTarget\n",
- "from azureml.contrib.core.compute.cmakscompute import CmAksCompute\n",
- "for key, target in ws.compute_targets.items():\n",
- " if type(target) is CmAksCompute:\n",
- " print('Found compute target:{}\\ttype:{}\\tprovisioning_state:{}\\tlocation:{}'.format(target.name, target.type, target.provisioning_state, target.location))"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Just replace the cluster_name with your own aks name"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {},
- "outputs": [],
- "source": [
- "compute_name='your-aks-name'\n",
- "compute_target = ComputeTarget(workspace=ws, name=compute_name)"
- ]
- },
{
"cell_type": "code",
"execution_count": null,
"source": [
"run.wait_for_completion(show_output=True) # this provides a verbose log"
]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": []
}
],
"metadata": {
"friendly_name": "Distributed PyTorch",
"index_order": 1,
"kernelspec": {
- "display_name": "Python 3",
+ "display_name": "cmk8s",
"language": "python",
- "name": "python3"
+ "name": "cmk8s"
},
"language_info": {
"codemirror_mode": {
