azure-sdk-for-python
azure-sdk-for-python copied to clipboard
Can't run sample usage to get data assets
- 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:
- Create a data asset (URI_Folder) for images.
- Go to consume and use the code :
Expected behavior I should be able to download the data asset.
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @azureml-github @Azure/azure-ml-sdk.
@LucasColas thanks for your issue. @azureml-github will take a look and respond as soon as possible.
Good. Thank you.
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
Thanks @anliakho2 , @LucasColas I will update about next azureml-sdk release version 1.56.0
Hi @LucasColas , we released SDK 1.56.0 in pypi.org could you please validate and confirm?
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.
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!