Skip to content

After PR #396, notebook results in NoneType compute_target #401

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
clmccart opened this issue May 30, 2019 · 1 comment
Closed

After PR #396, notebook results in NoneType compute_target #401

clmccart opened this issue May 30, 2019 · 1 comment
Labels

Comments

@clmccart
Copy link

After PR #396, compute_target variable ends up being none when running out of the box. If you create a workspace from the portal, there is no default compute target created.
This command creates a nonetype object:

import os

cluster_type = os.environ.get("AML_COMPUTE_CLUSTER_TYPE", "CPU")
compute_target = ws.get_default_compute_target(cluster_type)

which results in a traceback error on this command:

from azureml.train.estimator import Estimator

script_params = {
    '--data-folder': ds.path('mnist').as_mount(),
    '--regularization': 0.05
}

est = Estimator(source_directory=script_folder,
                script_params=script_params,
                compute_target=compute_target,
                entry_script='train.py',
                conda_packages=['scikit-learn'])

Workaround: create a compute target in the portal and replace command 1 with:

   compute_target = ws.compute_targets[compute_name]
@DebFro DebFro added the Compute label Apr 16, 2020
@v-strudm-msft
Copy link

Thank you for your post and participation. We will close this thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants