i cant trigger azure ml pipeline from synapse because of this error User starting the run is not an owner or assigned user to the Compute Instance

MarwanSamrout-7915 40 Reputation points
2024-01-29T16:51:42.2666667+00:00

i have a working pipeline in azure ml and i successfully ran it in azure ml workspace (notebook) ,and i published the pipeline so i can use it in synapse analytics, but when i try to trigger the pipeline in synapse i get this error :
Failed to submit job due to Exception: Response status code does not indicate success: 400 (User starting the run is not an owner or assigned user to the Compute Instance). User starting the run is not an owner or assigned user to the Compute Instance.
here is my component code , i tried with both compute cluster and computer instance and i get the same issue.

import os  
import argparse  
from azureml.core import Dataset
from azure.identity import DefaultAzureCredential
from azure.storage.filedatalake import DataLakeServiceClient
import logging
# import mlflow
def main():
    parser=argparse.ArgumentParser()
    parser.add_argument("--data",type=str,help="data lake gen2 path for input data")
    parser.add_argument("--path",type=str,help="path for output")
    parser.add_argument("--outputdata",type=str,help="data lake gen2 path for output data")
    args=parser.parse_args()
    print("test testtest testtest test")
    # mlflow.start_run()
    #my func
    data_path="csv web path"
    # mlflow.log_metric("data_path", args.data)
    dataset = Dataset.Tabular.from_delimited_files(data_path, separator=',',set_column_types=None)
    print(dataset.to_pandas_dataframe().head())
    df = dataset.to_pandas_dataframe()
    token_credential = DefaultAzureCredential()
    account_url = f"ACCOUNTURl LINK"
    service_client = DataLakeServiceClient(account_url, credential=token_credential)
    file_system_client = service_client.get_file_system_client("dataasset2")
    directory_client = file_system_client.get_directory_client("test")
    file_name = args.path
    file_client = directory_client.get_file_client(file_name)
    csv_data = df.to_csv(index=False).encode('utf-8')
    file_client.upload_data(csv_data, overwrite=True)
    # mlflow.end_run()

if __name__=="__main__":
    main()

@Amira Bedhiafi

Azure Machine Learning
Azure Machine Learning
An Azure machine learning service for building and deploying models.
3,334 questions
Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
5,373 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Amira Bedhiafi 33,071 Reputation points Volunteer Moderator
    2024-01-29T17:20:37.5766667+00:00

    A specific Azure compute instance is assigned to one user who has rights as a root. This configuration assures that all operations and job of experiment are assigned onto the identity this user has within RBAC for Azure When an automation process uses a different user account from the owner of instance, it can error while trying to access the compute Instance. To solve this, use either a compute cluster or start the run with an account that is owned by the owner of a compute cluster. Here are old threads to help you : https://learn.microsoft.com/en-us/answers/questions/1350625/the-user-starting-the-run-is-not-an-owner-or-assig https://learn.microsoft.com/en-us/answers/questions/661588/executing-pipeline-in-aml-from-adf-suddenly-stoppe

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.