question

sudhakarpandey-1097 avatar image
0 Votes"
sudhakarpandey-1097 asked ramr-msft commented

Getting below error while creating dataset

{
"error": {
"code": "UserError",
"message": "Cannot load any data from the specified path. Make sure the path is accessible and contains data.\nScriptExecutionException was caused by StreamAccessException.\r\n StreamAccessException was caused by NotFoundException.\r\n Found no resources for the input provided: '[REDACTED]'\r\n| session_id=9d60cf18-54e5-457a-910d-5dcd223fa0a0"
}
}

Code I am using is

-----------------------------------------------------

Import required azureml classes


-----------------------------------------------------

from azureml.core import Workspace, Datastore, Dataset


-----------------------------------------------------

Access the workspace from the config.json


-----------------------------------------------------

ws = Workspace.from_config(path="./config")


-----------------------------------------------------

Access datastore by its name

-----------------------------------------------------

az_store = Datastore.get(ws, "workspaceblobstore")


-----------------------------------------------------

Create and register the dataset

-----------------------------------------------------


Create the path of the csv file

csv_path = [(az_store, "azureml/EmployeeAC1.csv")]

Create the dataset

Create the dataset

loan_dataset = Dataset.Tabular.from_delimited_files(path=csv_path)

loan_dataset = loan_dataset.register(workspace=ws,
name="Employee Using SDK",
create_new_version=True)

azure-machine-learning
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@sudhakarpandey-1097 Thanks for the question. Below is the link to document for accessing the data. Can you please add more details about the az_store that you are getting.

https://docs.microsoft.com/en-us/azure/machine-learning/how-to-access-data

Access Validation:https://docs.microsoft.com/en-us/azure/machine-learning/how-to-access-data#access-validation

0 Votes 0 ·

@sudhakarpandey-1097 Thanks, Here is the link to create a Tabular dataset: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-create-register-datasets#create-a-tabulardataset

 from azureml.core import Workspace, Datastore, Dataset
    
 datastore_name = 'your datastore name'
    
 # get existing workspace
 workspace = Workspace.from_config()
        
 # retrieve an existing datastore in the workspace by name
 datastore = Datastore.get(workspace, datastore_name)
    
 # create a TabularDataset from 3 file paths in datastore
 datastore_paths = [(datastore, 'weather/2018/11.csv'),
                    (datastore, 'weather/2018/12.csv'),
                    (datastore, 'weather/2019/*.csv')]
    
 weather_ds = Dataset.Tabular.from_delimited_files(path=datastore_paths)
0 Votes 0 ·

@sudhakarpandey-1097 Thanks for the details. We are not seeing any error while creating dataset.

0 Votes 0 ·

0 Answers