azure-sdk-for-python icon indicating copy to clipboard operation
azure-sdk-for-python copied to clipboard

Can't run sample usage to get data assets

Open LucasColas opened this issue 2 years ago • 7 comments

  • Package Name: azure-core
  • Package Version: 1.27.1
  • Operating System:Linux
  • Python Version: 3.10

Describe the bug I used the code given by azure ml to use to get my data asset. But I got an error :

AttributeError Traceback (most recent call last) /home/azureuser/cloudfiles/code/Users/lucas.colas/segmentation-of-windows-and-doors/detection/train_model.ipynb Cell 8 line 1 8 workspace = Workspace(subscription_id, resource_group, workspace_name) 10 dataset = Dataset.get_by_name(workspace, name='object_detection_images') ---> 11 dataset.download(target_path='.', overwrite=False)

File /anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages/azureml/data/_loggerfactory.py:132, in track..monitor..wrapper(*args, **kwargs) 130 with _LoggerFactory.track_activity(logger, func.name, activity_type, custom_dimensions) as al: 131 try: --> 132 return func(*args, **kwargs) 133 except Exception as e: 134 if hasattr(al, 'activity_info') and hasattr(e, 'error_code'):

File /anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages/azureml/data/file_dataset.py:155, in FileDataset.download(self, target_path, overwrite, ignore_not_found) 150 download_list = None 151 if not is_empty and not overwrite: 152 # need to fail if destination is not empty and download would have collisions 153 download_list = [ 154 os.path.abspath(os.path.join(target_path, '.' + p)) --> 155 for p in self._to_path(activity='download.to_path') 156 ] 158 for p in download_list: 159 # encode p to avoid UnicodeEncodeError from os.path.exists 160 if os.path.exists(_encode_if_needed(p)): ... --> 677 (prefix_path, _) = dataflow._find_path_prefix() 678 portable_path = 'Portable Path' 679 get_portable_path = dataprep().api.functions.get_portable_path

AttributeError: 'Dataflow' object has no attribute '_find_path_prefix'

To Reproduce Steps to reproduce the behavior:

  1. Create a data asset (URI_Folder) for images.
  2. Go to consume and use the code : Capture d'écran 2023-11-08 144400 floute

Expected behavior I should be able to download the data asset.

LucasColas avatar Nov 08 '23 19:11 LucasColas

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @azureml-github @Azure/azure-ml-sdk.

github-actions[bot] avatar Nov 08 '23 20:11 github-actions[bot]

@LucasColas thanks for your issue. @azureml-github will take a look and respond as soon as possible.

kristapratico avatar Nov 08 '23 20:11 kristapratico

Good. Thank you.

LucasColas avatar Nov 08 '23 21:11 LucasColas

Thank you for reporting this. As it stands today the only type of V2 data asset that is supported in V1 SDK is MLTable. With currently released code you have two options:

  • Use V2 sdk to download data
  • Create an MLtable pointing to the same data and register it as MLTable asset, then load it by name in V1 SDK.

I have added code to support both UriFolder and UriFile data assets in V1 SDK, so it should be released with the next azureml-sdk version (1.56 most likely) Hope this helps

anliakho2 avatar Feb 03 '24 07:02 anliakho2

Thanks @anliakho2 , @LucasColas I will update about next azureml-sdk release version 1.56.0

isaudagar avatar Feb 05 '24 13:02 isaudagar

Hi @LucasColas , we released SDK 1.56.0 in pypi.org could you please validate and confirm?

isaudagar avatar Apr 30 '24 13:04 isaudagar

Hi @LucasColas. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.

github-actions[bot] avatar May 02 '24 11:05 github-actions[bot]

Hi @LucasColas, we're sending this friendly reminder because we haven't heard back from you in 7 days. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!

github-actions[bot] avatar May 09 '24 15:05 github-actions[bot]