Azure Machine Learning Python SDK Error "RunIDConflict"

Nils 1 Reputation point
2021-02-04T15:11:51.86+00:00

Hello everybody,

I am currently learning Azure Machine Learning using the learning paths and labs. The lab scripts give me the following error I could not find anywhere yet.

"Run IDs must be unique within a workspace and can only be used once. Ensure multiple runs with the same ID are not submitted simultaneously."

I am running the scripts locally. I have tried both Jupyter Notebook and VS Code. The error occurs exactly after 65 seconds when running experiment scripts. Both lab 1 with script config and lab 2 with an estimator give me the error. Running experiments directly within the IPython script works and I can see the results in the Azure web GUI. My SDK version is 1.21. When I did this in May 2020 with SDK version 1.15 I did not receive this error.

The respective code blocks that throw the errors copied from the lab scripts:

Lab 1:

import os
import sys
from azureml.core import Experiment, ScriptRunConfig
from azureml.widgets import RunDetails


# Create a script config
script_config = ScriptRunConfig(source_directory=experiment_folder, 
                      script='diabetes_experiment.py') 

# submit the experiment
experiment = Experiment(workspace = ws, name = 'diabetes-experiment')
run = experiment.submit(config=script_config)
RunDetails(run).show()
run.wait_for_completion()

Lab 2:

from azureml.train.estimator import Estimator
from azureml.core import Experiment

# Create an estimator
estimator = Estimator(source_directory=training_folder,
                      entry_script='diabetes_training.py',
                      compute_target='local',
                      conda_packages=['scikit-learn']
                      )

# Create an experiment
experiment_name = 'diabetes-training'
experiment = Experiment(workspace = ws, name = experiment_name)

# Run the experiment based on the estimator
run = experiment.submit(config=estimator)
run.wait_for_completion(show_output=True)

Can you tell me how to fix this error? Thanks in advance.

Regards

Azure Machine Learning
Azure Machine Learning
An Azure machine learning service for building and deploying models.
2,604 questions
{count} votes

2 answers

Sort by: Most helpful
  1. GiftA-MSFT 11,151 Reputation points
    2021-02-16T20:59:54.947+00:00

    Please try to run the labs using Azure ML Studio (Notebooks), I was able to run it there without any errors. However, while running locally, I ran into a different error. Hence, the error may be related to your local environment. I also noticed the Labs have been archived, so please report the issue directly to Microsoft Learn team. If you're trying to explore Azure ML, please follow the tutorials in our official documentation. Hope this helps!

    0 comments No comments

  2. PZ 1 Reputation point
    2021-09-24T08:52:48.263+00:00

    Anyone have find a solution to it? I meet the same issue.

      1 src.run_config.environment = system_managed_env
    

    ----> 2 run = exp.submit(src)

    C:\Anaconda\lib\site-packages\azureml\core\experiment.py in submit(self, config, tags, **kwargs)
    218 submit_func = get_experiment_submit(config)
    219 with self._log_context("submit config {}".format(config.class.name)):
    --> 220 run = submit_func(config, self.workspace, self.name, **kwargs)
    221 if tags is not None:
    222 run.set_tags(tags)

    C:\Anaconda\lib\site-packages\azureml\core\script_run_config.py in submit(script_run_config, workspace, experiment_name, run_id, _parent_run_id, credential_passthrough)
    62 run = _commands.start_run(project, run_config,
    63 telemetry_values=script_run_config._telemetry_values,
    ---> 64 run_id=run_id, parent_run_id=_parent_run_id)
    65 run.add_properties(global_tracking_info_registry.gather_all(script_run_config.source_directory))
    66

    C:\Anaconda\lib\site-packages\azureml_execution_commands.py in start_run(project_object, run_config_object, run_id, injected_files, telemetry_values, parent_run_id, prepare_only, check)
    117 raise ExperimentExecutionException("Can not check preparation of local targets")
    118 return _start_internal_local_cloud(project_object, run_config_object,
    --> 119 **shared_start_run_kwargs)
    120 else:
    121 return _start_internal(project_object, run_config_object, prepare_check=check,

    C:\Anaconda\lib\site-packages\azureml_execution_commands.py in _start_internal_local_cloud(project_object, run_config_object, prepare_only, custom_target_dict, run_id, injected_files, telemetry_values, parent_run_id)
    267
    268 response = ClientBase._execute_func(requests.post, uri, files=files, headers=headers)
    --> 269 _raise_request_error(response, "starting run")
    270
    271 invocation_zip_path = os.path.join(project_temp_dir, "invocation.zip")

    C:\Anaconda\lib\site-packages\azureml_execution_commands.py in _raise_request_error(response, action)
    569 # response.text is a JSON from execution service.
    570 response_message = get_http_exception_response_string(response)
    --> 571 raise ExperimentExecutionException(response_message)
    572
    573

    ExperimentExecutionException: ExperimentExecutionException:
    Message: {
    "error_details": {
    "componentName": "execution",
    "correlation": {
    "operation": "a6adb9078e64c642a0828802f831f801",
    "request": "aea5e681ddf5e549"
    },
    "environment": "westeurope",
    "error": {
    "code": "UserError",
    "innerError": {
    "code": "Conflict",
    "innerError": {
    "code": "RunIDConflict"
    }
    },
    "message": "Run IDs must be unique within a workspace and can only be used once. Ensure multiple runs with the same ID are not submitted simultaneously.",
    "messageFormat": "Run IDs must be unique within a workspace and can only be used once. Ensure multiple runs with the same ID are not submitted simultaneously."
    },

    0 comments No comments