File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed
ignore/doc-qa/how-to-set-up-training-targets Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 55
66print ("SDK version:" , azureml .core .VERSION )
77
8- #<local_env >
8+ #<run_local >
99from azureml .core .runconfig import RunConfiguration
1010
1111# Edit a run configuration property on the fly.
1515
1616# Choose a specific Python environment by pointing to a Python path. For example:
1717# run_config.environment.python.interpreter_path = '/home/ninghai/miniconda3/envs/sdk2/bin/python'
18- #</local_env >
18+ #</run_local >
1919
2020from azureml .core import Workspace
2121ws = Workspace .from_config ()
Original file line number Diff line number Diff line change 1818exp = Experiment (workspace = ws , name = experiment_name )
1919
2020
21- #<amlcompute_temp >
21+ #<run_temp_compute >
2222from azureml .core .compute import ComputeTarget , AmlCompute
2323
2424# First, list the supported VM families for Azure Machine Learning Compute
3434# AmlCompute is created in the same region as your workspace
3535# Set the VM size for AmlCompute from the list of supported_vmsizes
3636run_temp_compute .amlcompute .vm_size = 'STANDARD_D2_V2'
37- #</amlcompute_temp >
37+ #</run_temp_compute >
3838
3939
4040# Submit the experiment using the run configuration
Original file line number Diff line number Diff line change 1616
1717exp = Experiment (workspace = ws , name = experiment_name )
1818
19- #<cpu_basic >
19+ #<cpu_cluster >
2020from azureml .core .compute import ComputeTarget , AmlCompute
2121from azureml .core .compute_target import ComputeTargetException
2222
3333 cpu_cluster = ComputeTarget .create (ws , cpu_cluster_name , compute_config )
3434
3535cpu_cluster .wait_for_completion (show_output = True )
36- #</cpu_basic >
36+ #</cpu_cluster >
3737
38- #<aml_runconfig >
38+ #<run_amlcompute >
3939from azureml .core .runconfig import RunConfiguration
4040from azureml .core .conda_dependencies import CondaDependencies
4141from azureml .core .runconfig import DEFAULT_CPU_IMAGE
6060
6161# Specify CondaDependencies obj, add necessary packages
6262run_amlcompute .environment .python .conda_dependencies = CondaDependencies .create (conda_packages = ['scikit-learn' ])
63- #</aml_runconfig >
63+ #</run_amlcompute >
6464
6565# Submit the experiment using the run configuration
6666#<amlcompute_submit>
You can’t perform that action at this time.
0 commit comments