How to configure job yaml and Yolov8 dataset ymal to access data asset on Azure?

I want to train a custom model using Yolov8. I want to run the job on Azure Machine Learning Studio using Azure ML CLI v2.

Issue:
When I run on job on Azure ML, I get an error saying Permission Denied

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>Error Code: ScriptExecution.StreamAccess.Authentication
Native Error: error in streaming from input data sources
StreamError(PermissionDenied(Some(This request is not authorized to perform this operation using this permission.)))
=> permission denied when access stream. Reason: Some(This request is not authorized to perform this operation using this permission.)
PermissionDenied(Some(This request is not authorized to perform this operation using this permission.))
Error Message: Authentication failed when trying to access the stream. Make sure you have correct permissions set up. Ok(This request is not authorized to perform this operation using this permission.)| session_id=da7b713c-6cc8-4f6d-b24f-b54ab37e14ef
</code>
<code>Error Code: ScriptExecution.StreamAccess.Authentication Native Error: error in streaming from input data sources StreamError(PermissionDenied(Some(This request is not authorized to perform this operation using this permission.))) => permission denied when access stream. Reason: Some(This request is not authorized to perform this operation using this permission.) PermissionDenied(Some(This request is not authorized to perform this operation using this permission.)) Error Message: Authentication failed when trying to access the stream. Make sure you have correct permissions set up. Ok(This request is not authorized to perform this operation using this permission.)| session_id=da7b713c-6cc8-4f6d-b24f-b54ab37e14ef </code>
Error Code: ScriptExecution.StreamAccess.Authentication
Native Error: error in streaming from input data sources
    StreamError(PermissionDenied(Some(This request is not authorized to perform this operation using this permission.)))
=> permission denied when access stream. Reason: Some(This request is not authorized to perform this operation using this permission.)
    PermissionDenied(Some(This request is not authorized to perform this operation using this permission.))
Error Message: Authentication failed when trying to access the stream. Make sure you have correct permissions set up. Ok(This request is not authorized to perform this operation using this permission.)| session_id=da7b713c-6cc8-4f6d-b24f-b54ab37e14ef

Yaml file:

  1. job.yaml:
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>$schema: https://azuremlschemas.azureedge.net/latest/commandJob.schema.json
experiment_name: yolov8-experiment
command: |
sed -i "s|path:.*$|path: ${{ inputs.training_data }}|" custom_dataset.yaml
# Train the model
yolo task=detect train data=custom_dataset.yaml model=${{ inputs.model_to_train }} epochs=10 project=yolov8-experiment name=experiment
inputs:
training_data:
type: uri_folder
mode: ro_mount
path: azure:data_asset:1
model_to_train:
type: custom_model
path: azureml:yolov8l:1
code: /training-code/
environment: azureml:yolov8-environment:1
compute: azureml:compute_cluster
</code>
<code>$schema: https://azuremlschemas.azureedge.net/latest/commandJob.schema.json experiment_name: yolov8-experiment command: | sed -i "s|path:.*$|path: ${{ inputs.training_data }}|" custom_dataset.yaml # Train the model yolo task=detect train data=custom_dataset.yaml model=${{ inputs.model_to_train }} epochs=10 project=yolov8-experiment name=experiment inputs: training_data: type: uri_folder mode: ro_mount path: azure:data_asset:1 model_to_train: type: custom_model path: azureml:yolov8l:1 code: /training-code/ environment: azureml:yolov8-environment:1 compute: azureml:compute_cluster </code>
$schema: https://azuremlschemas.azureedge.net/latest/commandJob.schema.json
experiment_name: yolov8-experiment

command: |
  sed -i "s|path:.*$|path: ${{ inputs.training_data }}|" custom_dataset.yaml
  # Train the model
  yolo task=detect train data=custom_dataset.yaml model=${{ inputs.model_to_train }} epochs=10 project=yolov8-experiment name=experiment

inputs:
  training_data:
    type: uri_folder 
    mode: ro_mount
    path: azure:data_asset:1
  model_to_train:
    type: custom_model
    path: azureml:yolov8l:1

code: /training-code/
environment: azureml:yolov8-environment:1
compute: azureml:compute_cluster
  1. custom_dataset.yaml file:
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>path: ../dataset
train: /images/train/
test: /images/test/
val: /images/test/
nc=2
# class names
names:[class1, class2]
</code>
<code>path: ../dataset train: /images/train/ test: /images/test/ val: /images/test/ nc=2 # class names names:[class1, class2] </code>
path: ../dataset
train: /images/train/
test: /images/test/
val: /images/test/

nc=2

# class names
names:[class1, class2]

Below are the reference I used for the Training:
Medium-article-yolov8-training-azure-cli
Training Models on Azure ML with CLI v2 – Microsoft Training

I am currently facing issues determining the necessary permissions to proceed with my Azure setup. I have successfully signed in using ‘az login’ and have managed to create various components such as the environment, compute cluster, and data asset.

However, I am unsure about the specific permissions required to proceed further. Could someone please provide guidance on what permissions need to be granted for my setup to function properly? Any insights or recommendations would be greatly appreciated. Thank you!

New contributor

aditijedhe is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật