3838with open ("aml_config/security_config.json" ) as f :
3939 config = json .load (f )
4040
41- aml_cluster_name = config [' aml_cluster_name' ]
41+ aml_cluster_name = config [" aml_cluster_name" ]
4242
43- # un-comment the below lines if you want to put AML Compute under Vnet. Also update /aml_config/security_config.json
43+ # un-comment the below lines if you want to put AML Compute under Vnet. Also update /aml_config/security_config.json
4444# vnet_resourcegroup_name = config['vnet_resourcegroup_name']
4545# vnet_name = config['vnet_name']
4646# subnet_name = config['subnet_name']
4747
4848# Verify that cluster does not exist already
4949try :
5050 cpu_cluster = ComputeTarget (workspace = ws , name = aml_cluster_name )
51- print (' Found existing cluster, use it.' )
51+ print (" Found existing cluster, use it." )
5252except ComputeTargetException :
53- compute_config = AmlCompute .provisioning_configuration (vm_size = 'STANDARD_D2_V2' ,
54- vm_priority = 'dedicated' ,
55- min_nodes = 1 ,
56- max_nodes = 3 ,
57- idle_seconds_before_scaledown = '300' ,
58- # #Uncomment the below lines for VNet support
59- # vnet_resourcegroup_name=vnet_resourcegroup_name,
60- # vnet_name=vnet_name,
61- # subnet_name=subnet_name
62- )
53+ compute_config = AmlCompute .provisioning_configuration (
54+ vm_size = "STANDARD_D2_V2" ,
55+ vm_priority = "dedicated" ,
56+ min_nodes = 1 ,
57+ max_nodes = 3 ,
58+ idle_seconds_before_scaledown = "300" ,
59+ # #Uncomment the below lines for VNet support
60+ # vnet_resourcegroup_name=vnet_resourcegroup_name,
61+ # vnet_name=vnet_name,
62+ # subnet_name=subnet_name
63+ )
6364 cpu_cluster = ComputeTarget .create (ws , aml_cluster_name , compute_config )
6465
65- cpu_cluster .wait_for_completion (show_output = True )
66+ cpu_cluster .wait_for_completion (show_output = True )
0 commit comments