Skip to content

configuration.ipynb should specify default compute target #387

@dem108

Description

@dem108

Issue summary

Current GitHub sample run: fails when using
https://github.com/Azure/MachineLearningNotebooks/blob/master/configuration.ipynb does not include specifying default compute target when creating a workspace.
https://github.com/Azure/MachineLearningNotebooks/blob/master/how-to-use-azureml/training-with-deep-learning/train-hyperparameter-tune-deploy-with-keras/train-hyperparameter-tune-deploy-with-keras.ipynb tries to use the default compute target, which fails.
These two are not consistent.

How to reproduce:

Just git clone and run above two notebooks.

Proposed Solution:

The configuration.ipynb should be updated: when creating workspace, it should specify default compute target.

import os
from azureml.core.compute import AmlCompute

compute_min_nodes = os.environ.get("AML_COMPUTE_CLUSTER_MIN_NODES", 0)
compute_max_nodes = os.environ.get("AML_COMPUTE_CLUSTER_MAX_NODES", 4)
vm_size = os.environ.get("AML_COMPUTE_CLUSTER_SKU","STANDARD_D2_V2")
provisioning_config = AmlCompute.provisioning_configuration(vm_size = vm_size, min_nodes = compute_min_nodes, max_nodes = compute_max_nodes)

from azureml.core import Workspace
ws = Workspace.create(name='<WORKSPACE_NAME>' ,
                      subscription_id='<SUBSCRIPTION_ID>' ,
                      resource_group='<RESOURCE_GROUP>' ,
                      create_resource_group=True ,
                      default_cpu_compute_target=provisioning_config ,
                      location='<LOCATION>')

Please confirm and fix the issue if this is correct.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions