Update submit-training-jobs.md
-In CMAKS, we will provide the same AML experiences as other compute target. For the data scientists, the workflow to submit a AML training job can be summarize as below:
+You can submit a job once you have attached(installed amlk8s operator) a Kubernetes cluster (AKS or Arc Kubernetes) to an AML workspace
-1. get the workspace
-```python
-from azureml.contrib.core.compute.cmakscompute import CmAksCompute
-from azureml.core.compute import ComputeTarget
-from azureml.core import Workspace
-ws = Workspace.from_config()
-```
-
-2. attach CMAKS compute
-
-```python
-from azureml.contrib.core.compute.cmakscompute import CmAksCompute
-from azureml.core import Workspace
-attach_config = CmAksCompute.attach_configuration(cluster_name =<cluster_name>
- , resource_group =<resource group>
- , node_pool=<node pool>
- )
-
-cmaks_target = CmAksCompute.attach(ws, <compute name>, attach_config)
-```
-
-3. define experiment
+1. define experiment
```python
from azureml.core import Experiment
@@ -30,23 +9,24 @@ experiment_name = <experiment name>
experiment = Experiment(workspace = ws, name = experiment_name)
```
-4. submit run
+1. submit run
```python
+from azureml.core import ScriptRunConfig
-project_folder = '.'
-script = 'sklearn.py'
-
-from azureml.train.estimator import Estimator
+script_rc = ScriptRunConfig(
+ source_directory='.',
+ script='sklearn.py',
+ arguments=['--kernel', 'linear', '--penalty', 1.0],
+ compute_target=cmaks_target
+)
-sk_est = Estimator(source_directory=project_folder,
- compute_target=cmaks_compute,
- entry_script=script,
- conda_packages=['scikit-learn'])
+script_rc.run_config.amlk8scompute.resource_configuration.gpu_count = 1
+script_rc.run_config.amlk8scompute.resource_configuration.cpu_count = 1
+script_rc.run_config.amlk8scompute.resource_configuration.memory_request_in_gb = 1
-run = experiment.submit(sk_est)
-run
+run = experiment.submit(script_rc)
```
You can find sample notebooks under: https://github.com/Azure/CMK8s-Sample/tree/master/sample_notebooks
-After submmit runs you can [View metrics in Compute level and runs level](https://github.com/Azure/CMK8s-Samples/blob/master/docs/4.%20View%20metrics%20in%20Compute%20level%20and%20runs%20level.markdown)
+
