Azure machine learning compute local

Clervens Volcy 20 Reputation points
2023-10-29T03:57:15.7833333+00:00

I would like to use the azure sdk v2 to run a job on my machine (windows 11). I've changed the compute option to 'local' in the command function.

When run the code below the job is stucked on "Starting" in Azure AI | Machine Learning Studio.

If i run the same code in WSL2 in a Ubuntu the job failed on start with the following error
User's image

Code snippet:

registered_model_name = "credit_defaults_model"
experiment_name = "test-sdkv2"

command_job = command(
    inputs=dict(
        data=Input(
            type="uri_file",
path="https://azuremlexamples.blob.core.windows.net/datasets/credit_card/default_of_credit_card_clients.csv",
        ),
        test_train_ratio=0.2,
        learning_rate=0.25,
        registered_model_name=registered_model_name,
    ),
    code=code_folder_path,  # location of source code
    command="python noop.py --data ${{inputs.data}} --test_train_ratio ${{inputs.test_train_ratio}} --learning_rate ${{inputs.learning_rate}} --registered_model_name ${{inputs.registered_model_name}}",
    environment="AzureML-sklearn-1.0-ubuntu20.04-py38-cpu@latest",#env,
    compute="local", #delete this line to use serverless compute
    experiment_name=experiment_name
)

returned_job = ml_client.jobs.create_or_update(command_job)
Azure Machine Learning
0 comments No comments
{count} votes

Answer accepted by question author
  1. Ramr-msft 17,836 Reputation points
    2023-10-30T11:24:51.0466667+00:00

    @Clervens Volcy Thanks for the question, Here are a few things you could try. Here is link to similar that can help.

    Check your Docker image: Make sure you have the correct Docker image set in your environment. You can set the image on your environment using something like this: env.docker.base_image = 'mcr.microsoft.com/azureml/openmpi3.1.2-ubuntu18.04'.

    Check your WSL2 setup: If you’re running the job in WSL2 on Ubuntu, make sure your WSL2 setup is correct. Some users have reported issues with Ubuntu on WSL2 and have resolved them by disabling and re-enabling the “Virtual Machine Platform” feature, or by uninstalling and reinstalling Ubuntu and Docker Desktop.

    Check for conda installation problems: If the container crashed or is taking too long to start up, it’s likely that the conda environment update has failed to resolve correctly.

    Use MLFlow SDK for logging of metrics, saving and logging models, etc.

    Check your compute target: For local compute, you could try setting your environment to a user-managed environment with myenv = Environment ("user-managed-env") and myenv.python.user_managed_dependencies = True.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

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