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

405 Not Allowed when running POST request to runtime URL #155

Open
pgr-lopes opened this issue May 28, 2024 · 1 comment
Open

405 Not Allowed when running POST request to runtime URL #155

pgr-lopes opened this issue May 28, 2024 · 1 comment

Comments

@pgr-lopes
Copy link

pgr-lopes commented May 28, 2024

Hey everyone.

I'm following the guide on how to setup the environment for CI/CD in this repo, and one of the steps we need to run a CURL command that sends a POST request to the AML workspace to configure the runtime for the prompt flow to run. Here is the code example shared in the readme:

curl --request POST
--url "$runtime_url_post"
--header "Authorization: Bearer $access_token"
--header 'Content-Type: application/json'
--data "{
"runtimeType": "ComputeInstance",
"computeInstanceName": "$compute_name"
}"

When I run this I get an HTTP 405 not allowed response:

405 Not Allowed

I've tried changing the SP permissions to contributor and even owner of the resource, with no luck. I also added the User assigned identity as contributor, but I don't think it is involved in this process at all. I have also tried doing it both locally via cli and also inside the Azure CLI itself, same error on both.
The URL used for the post request looks something like this:

https://ml.azure.com/api/west-europe/flow/api/subscriptions/$subscriptionId/resourceGroups/$rgname/providers/Microsoft.MachineLearningServices/workspaces/$workspace_name/FlowRuntimes/$runtimeName?asyncCall=true

I'm not sure what I could be doing wrong. Is anyone aware of changes to the way to call this API?

@pgr-lopes
Copy link
Author

The problem seems to be the way the Compute and Runtimes are now created in AML. You can no longer create a runtime prior to attaching the compute, even the UI won't allow you to do that. So those HTTP calls are no longer valid, there is no reference to any .../api/$region/flow...

I'll try to ignore that step and continue without it, but I suggest updating the guide to reflect these changes.

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