Skip to content

Instantly share code, notes, and snippets.

@aribornstein
Last active August 27, 2019 12:41
Show Gist options
  • Save aribornstein/671743fe246149bc98425a394f0e43cf to your computer and use it in GitHub Desktop.
Save aribornstein/671743fe246149bc98425a394f0e43cf to your computer and use it in GitHub Desktop.
LowPriorityInstances
from azureml.core.compute import ComputeTarget, AmlCompute
from azureml.core.compute_target import ComputeTargetException
cluster_name = "cluster"
compute_config = AmlCompute.provisioning_configuration(vm_size='STANDARD_D3_V2', # VM Size N series have GPU
vm_priority='lowpriority', # Cheap Computer
min_nodes=0, # Auto Scale Min Limit
max_nodes=5) #Auto Scale Max Limit
cluster = ComputeTarget.create(ws, cluster_name, compute_config)
cluster.wait_for_completion(show_output=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment