-1

I have a new error using Azure ML maybe due to the Ubuntu upgrade to 22.04 which I did yesterday.

I have a workspace azureml created through the portal and I can access it whitout any issue with python SDK

from azureml.core import Workspace
ws = Workspace.from_config("config/config.json")
ws.get_details()

output

{'id': '/subscriptions/XXXXX/resourceGroups/gr_louis/providers/Microsoft.MachineLearningServices/workspaces/azml_lk',
 'name': 'azml_lk',
 'identity': {'principal_id': 'XXXXX',
  'tenant_id': 'XXXXX',
  'type': 'SystemAssigned'},
 'location': 'westeurope',
 'type': 'Microsoft.MachineLearningServices/workspaces',
 'tags': {},
 'sku': 'Basic',
 'workspaceid': 'XXXXX',
 'sdkTelemetryAppInsightsKey': 'XXXXX',
 'description': '',
 'friendlyName': 'azml_lk',
 'keyVault': '/subscriptions/XXXXX/resourceGroups/gr_louis/providers/Microsoft.Keyvault/vaults/azmllkXXXXX',
 'applicationInsights': '/subscriptions/XXXXX/resourceGroups/gr_louis/providers/Microsoft.insights/components/azmllkXXXXX',
 'storageAccount': '/subscriptions/XXXXX/resourceGroups/gr_louis/providers/Microsoft.Storage/storageAccounts/azmllkXXXXX',
 'hbiWorkspace': False,
 'provisioningState': 'Succeeded',
 'discoveryUrl': 'https://westeurope.api.azureml.ms/discovery',
 'notebookInfo': {'fqdn': 'ml-azmllk-westeurope-XXXXX.westeurope.notebooks.azure.net',
  'resource_id': 'XXXXX'},
 'v1LegacyMode': False}

I then use this workspace ws to upload a file (or a directory) to Azure Blob Storage like so

from azureml.core import Dataset

ds = ws.get_default_datastore()

Dataset.File.upload_directory(
    src_dir="./data",
    target=ds,
    pattern="*dataset1.csv",
    overwrite=True,
    show_progress=True
)

which again works fine and outputs

Validating arguments.
Arguments validated.
Uploading file to /
Filtering files with pattern matching *dataset1.csv
Uploading an estimated of 1 files
Uploading ./data/dataset1.csv
Uploaded ./data/dataset1.csv, 1 files out of an estimated total of 1
Uploaded 1 files
Creating new dataset

{
  "source": [
    "('workspaceblobstore', '//')"
  ],
  "definition": [
    "GetDatastoreFiles"
  ]
}

My file is indeed uploaded to Blob Storage and I can see it either on azure portal or on azure ml studio (ml.azure.com). uploaded_file

The error comes up when I try to create a Tabular dataset from the uploaded file. The following code doesn't work :

from azureml.core import Dataset

data1 = Dataset.Tabular.from_delimited_files(
    path=[(ds, "dataset1.csv")]
)

and it gives me the error :

ExecutionError: 
Error Code: ScriptExecution.DatastoreResolution.Unexpected
Failed Step: XXXXXX
Error Message: ScriptExecutionException was caused by DatastoreResolutionException.
  DatastoreResolutionException was caused by UnexpectedException.
    Unexpected failure making request to fetching info for Datastore 'workspaceblobstore' in subscription: 'XXXXXX', resource group: 'gr_louis', workspace: 'azml_lk'. Using base service url: https://westeurope.experiments.azureml.net. HResult: 0x80131501.
      The SSL connection could not be established, see inner exception.
| session_id=XXXXXX

After some research, I assumed it might be due to openssl version (which now is 1.1.1) but I am not sure and I surely don't know how to fix it...any ideas ?

elka
  • 35
  • 6
  • So what did you see in the inner exception? – user207421 Aug 31 '22 at 09:54
  • Truth is...I have tried but I could not figure out how to get this "inner exception". I don't have any log files and a try except always returns me the same ExecutionError – elka Aug 31 '22 at 14:24

1 Answers1

-1

According to the document there is no direct procedure to convert the file dataset into tabular dataset. Instead, we can create a workspace and that creates two storage methods (blobstorage which is the default storage, file storage). The SSL will be taken care by workspace. We can create a datastore in the workspace and connect that to the blob storage.

Follow the procedure to do the same.

enter image description here

Create a workspace

enter image description here

If we want, we can create a dataset.

enter image description here

We can create from local files of datastore.

To choose a datastore, first we need to have a file in the datastore

enter image description here

Goto Datastores and click on create dataset. Observe that the name is workspaceblobstorage(default).

enter image description here

Fill the details and see that the dataset type is Tabular.

enter image description here

In the path, we will be having the local files path and can check there, under the select or create a datastore, it is showing default storage as blob.

enter image description here

After uploading, we can wee the name in this section which is a datastore and tabular dataset.

In your workspace created, check whether the public access is Disabled or Enabled. If disabled, it will not allow to access due to lack of SSL. Checkout the image below. After enabling, use the same procedure which was implemented till now.

enter image description here

Sairam Tadepalli
  • 1,563
  • 1
  • 3
  • 11
  • thanks for your reply although it doesn't quite answer my question...first I would need to use python SDK azureml and second I do have a workspace with a storage account associated on which i can upload a file but the error occurs when trying to generate a Tabular dataset from delimited uploaded file. However, I tried creating a dataset through azuml studio portal and it works. Which actually puzzles me even more ! – elka Aug 31 '22 at 07:18
  • Before using the code block, it is suggestable to check for **public access** of the workspace and the resources, which may not be enabled by default some cases. I have updated the answer to show, where we can enable public access of all network resources. The remaining python procedure used until now will be same. – Sairam Tadepalli Aug 31 '22 at 10:09
  • I checked and the public access was already enabled... – elka Aug 31 '22 at 12:57
  • Replace the existing code `data1 = Dataset.Tabular.from_delimited_files(path=[(ds, "dataset1.csv")])` with `data1= Dataset.Tabular.from_delimited_files(path=(datastore,'path_of_dataset'))` Inner exception occurred because using list instead of tuple while calling the datastore. – Sairam Tadepalli Sep 01 '22 at 11:29
  • well I tried this also already but it doesn't change anything...and worth to mention, this code worked perfectly before ubuntu 22.04 upgrade which is why I assume it has something to do with openssl version (3.0.2 in ubuntu 22.04 vs 1.1.1 in ubuntu 20.04) – elka Sep 01 '22 at 11:46
  • have you comment out the `ssl_conf` value in `/etc/ssl/openssl.cnf`? Comment it once and re-execute. – Sairam Tadepalli Sep 01 '22 at 11:53
  • I have with no success – elka Sep 01 '22 at 12:03
  • Have you tried to do `Uninstall OpenSSL 1.0.x`. Kindly checkout the notes about Open SSL restrictions in Ubuntu 22.04: https://askubuntu.com/questions/1405100/i-have-problem-with-new-ubuntu-22-04-and-openssl-3-0-2#:~:text=Ubuntu%2022.04%20upgraded%20OpenSSL%20to%20version%203.0.2%2C%20which,options%20flags%20that%20permits%20connection%20despite%20the%20vulnerability%3A – Sairam Tadepalli Sep 01 '22 at 12:10