Machinelearningnotebooks: Import Error - from azureml.core import Dataset - ImportError: cannot import name 'Dataset'

Created on 11 Feb 2020  路  2Comments  路  Source: Azure/MachineLearningNotebooks

The following sample notebook fails

img-classification-part1-training.ipynb

when running:

from azureml.core import Dataset

from azureml.core import Dataset
from azureml.opendatasets import MNIST

data_folder = os.path.join(os.getcwd(), 'data')
os.makedirs(data_folder, exist_ok=True)

mnist_file_dataset = MNIST.get_file_dataset()
mnist_file_dataset.download(data_folder, overwrite=True)

mnist_file_dataset = mnist_file_dataset.register(workspace=ws,
name='mnist_opendataset',
description='training and test dataset',
create_new_version=True)

Here is the error

ImportError Traceback (most recent call last)
in
----> 1 from azureml.core import Dataset
2 from azureml.opendatasets import MNIST
3
4 data_folder = os.path.join(os.getcwd(), 'data')
5 os.makedirs(data_folder, exist_ok=True)

ImportError: cannot import name 'Dataset'

reference: yml file:
name: img-classification-part1-training
dependencies:

  • pip:

    • azureml-sdk

    • azureml-widgets

    • matplotlib

    • sklearn

    • pandas

    • azureml-opendatasets

Azure ML SDK Version: 1.0.17
Python 3.6 - AzureML

@microsoft
Please kindly investigate.
Many thanks :)

Training product-issue

Most helpful comment

@andrewkinsella, version 1.0.17 is from almost a year ago. During that time, the Datasets class has evolved significantly (for the better). Can you try upgrading the SDK to the newest version and trying again? @MayMSFT

All 2 comments

@andrewkinsella, version 1.0.17 is from almost a year ago. During that time, the Datasets class has evolved significantly (for the better). Can you try upgrading the SDK to the newest version and trying again? @MayMSFT

Thank you very much @swanderz
I will try your recommendation.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jmwoloso picture jmwoloso  路  4Comments

wagenrace picture wagenrace  路  3Comments

vineetgarhewal picture vineetgarhewal  路  3Comments

dumbledad picture dumbledad  路  3Comments

AakanchJoshi picture AakanchJoshi  路  4Comments