Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DefaultAzureCredential failed to retrieve a token from the included credentials #51

Open
18277390221 opened this issue Dec 6, 2024 · 2 comments

Comments

@18277390221
Copy link

When I was using azure service, I encountered this problem. According to the website prompted in the log, I saw that I should set some environment variables, but I did not know how to set them. Could you please provide me with some help?
Image
Image

@18277390221
Copy link
Author

I have solved the above problem, now I have a new problem, can you give me some advice

@18277390221
Copy link
Author

python3 run_azure.py --experiments_json "experiments.json"
2024-12-06 19:33:03,804 - INFO - Launching experiment: exposs
2024-12-06 19:33:03,804 - INFO - Environment is configured for ClientSecretCredential
2024-12-06 19:33:03,805 - INFO - ManagedIdentityCredential will use IMDS
2024-12-06 19:33:03,810 - ERROR - 2a541f26-8209-44d3-933e-5556269edf7d
2024-12-06 19:33:16,282 - INFO - <azureml.core.authentication.InteractiveLoginAuthentication object at 0x7de6d69d8850>
2024-12-06 19:33:26,080 - INFO - DefaultAzureCredential acquired a token from EnvironmentCredential
2024-12-06 19:33:32,469 - INFO - Compute instance w0Expexposs already exists. Skipping creation
2024-12-06 19:33:32,469 - INFO - Compute instance status: Running
2024-12-06 19:33:32,469 - INFO - Compute instance w0Expexposs is already Running.
2024-12-06 19:33:32,469 - INFO - Starting job on compute instance w0Expexposs...
2024-12-06 19:33:40,013 - INFO - Created a worker pool for first use
2024-12-06 19:33:54,811 - INFO - Message: ScriptRunSubmit
Payload: {"core_sdk_version": "1.58.0", "subscription": "", "run_id": "", "resource_group": "", "workspace_name": "agent_a1", "experiment_id": "", "location": "eastus2", "input_type": "FileDataset", "dataset_id": "e46478af-6da4-4635-a4f2-938e759a503e", "dataset_name": null, "dataset_version": "dataset.dataset.version", "consumption_mode": "mount", "compute": "w0Expexposs", "subscription_id": "6d7eea00-ee86-46fd-8784-c75a0d08986c", "resource_group_name": "agents"}
Process Process-1:
Traceback (most recent call last):
File "/home/dell/anaconda3/envs/winarena/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
self.run()
File "/home/dell/anaconda3/envs/winarena/lib/python3.9/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/home/sda/ZY/WindowsAgentArena/scripts/run_azure.py", line 161, in launch_vm_and_job
run = experiment.submit(config=src)
File "/home/dell/anaconda3/envs/winarena/lib/python3.9/site-packages/azureml/core/experiment.py", line 238, in submit
run = submit_func(config, self.workspace, self.name, **kwargs)
File "/home/dell/anaconda3/envs/winarena/lib/python3.9/site-packages/azureml/core/script_run_config.py", line 63, in submit
run = _commands.start_run(project, run_config,
File "/home/dell/anaconda3/envs/winarena/lib/python3.9/site-packages/azureml/_execution/_commands.py", line 120, in start_run
return _start_internal(project_object, run_config_object, prepare_check=check,
File "/home/dell/anaconda3/envs/winarena/lib/python3.9/site-packages/azureml/_execution/_commands.py", line 429, in _start_internal
_raise_request_error(response, "starting run")
File "/home/dell/anaconda3/envs/winarena/lib/python3.9/site-packages/azureml/_execution/_commands.py", line 570, in _raise_request_error
raise ExperimentExecutionException(response_message)
azureml.exceptions._azureml_exception.ExperimentExecutionException: ExperimentExecutionException:
Message: {
"error_details": {
"componentName": "execution",
"correlation": {
"operation": "a3e20104556d81877a634730347f747e",
"request": "2f69e77bce0b4054"
},
"environment": "eastus2",
"error": {
"code": "UserError",
"innerError": {
"code": "RunOwnerDeniedAccessToComputeInstance"
},
"message": "User starting the run is not an owner or assigned user to the Compute Instance",
"messageFormat": "User starting the run is not an owner or assigned user to the Compute Instance"
},
"location": "eastus2",
"statusCode": 400,
"time": "2024-12-06T11:33:58.0056243+00:00"
},
"status_code": 400,
"url": "https://eastus2.experiments.azureml.net/execution/v1.0/subscriptions/6d7eea00-ee86-46fd-8784-c75a0d08986c/resourceGroups/agents/providers/Microsoft.MachineLearningServices/workspaces/agent_a1/experiments/exposs/snapshotrun?runId=exposs_1733484834_d45a4b7d"
}
InnerException None
ErrorResponse
{
"error": {
"message": "{\n "error_details": {\n "componentName": "execution",\n "correlation": {\n "operation": "a3e20104556d81877a634730347f747e",\n "request": "2f69e77bce0b4054"\n },\n "environment": "eastus2",\n "error": {\n "code": "UserError",\n "innerError": {\n "code": "RunOwnerDeniedAccessToComputeInstance"\n },\n "message": "User starting the run is not an owner or assigned user to the Compute Instance",\n "messageFormat": "User starting the run is not an owner or assigned user to the Compute Instance"\n },\n "location": "eastus2",\n "statusCode": 400,\n "time": "2024-12-06T11:33:58.0056243+00:00"\n },\n "status_code": 400,\n "url": "https://eastus2.experiments.azureml.net/execution/v1.0/subscriptions/6d7eea00-ee86-46fd-8784-c75a0d08986c/resourceGroups/agents/providers/Microsoft.MachineLearningServices/workspaces/agent_a1/experiments/exposs/snapshotrun?runId=exposs_1733484834_d45a4b7d\"\n}"
}
}
2024-12-06 19:33:58,139 - INFO - All experiments have been completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant