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

Stream Analytics job Function - Deploy ACI container (swagger.json not found) #52204

Closed
NikosSpanos opened this issue Apr 11, 2020 · 15 comments
Closed

Comments

@NikosSpanos
Copy link

NikosSpanos commented Apr 11, 2020

I would like to use Stream Analytics Job to score data passing through stream analytics. When I connect the deployment to an existing ACI container instance then I get this message for the Function signature "Your deployment does not have an associated swagger.json".

The contrary to this error is the following two events:
Event 1: When I use the scoring URL to score some values locally (in a Jupyter Notebook) then the scoring is successful.
Event 2: I already infer the schema of the input data inside my score.py file.

What am I doing wrong?

ACI container instance is deployed with an authorization key + I infer the schema of the input & output sample in my score.py file. However, the Stream job cannot recognize the swagger file. Since I infer the schema I assumed it would have been generated automatically.

_Note 1: I use the Azure Machine Learning service Function which is a feature of the new stream analytics job (preview). _

_Note 2: I can clearly generate the swagger.json file. Although Azure Stream analytics function won't recognize it.
_

Note 3: I also compared the swagger json file of an AKS cluster and that of an ACI container instance.
And the difference between the two swagger files is the key "paths".
In AKS the path in the swagger.json is: "paths": { "/api/v1/service/aks-service/":.... etc
In ACI the path in the swagger.json is: "paths": { "/":....etc

And I assume that this is the root of the problem. Maybe Stream Analytics Job cannot recognize the path "/"


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@NikosSpanos NikosSpanos changed the title Stream Analytics job Function - Deploy ACI container Stream Analytics job Function - Deploy ACI container (swagger.json not found) Apr 11, 2020
@himanshusinha-msft
Copy link
Contributor

Thanks for the feedback and bringing this to our notice . At this time we are reviewing the feedback and will update the document as appropriate .

@CHEEKATLAPRADEEP-MSFT-zz
Copy link
Contributor

@NikosSpanos Thanks for reaching out. I see that you have opened a support case related to this issue. A support engineer is actively looking into it and will assist you as soon as they have an update. I will closely monitor this issue and update here once we have our findings ready.

@NikosSpanos
Copy link
Author

NikosSpanos commented Apr 14, 2020

@NikosSpanos Thanks for reaching out. I see that you have opened a support case related to this issue. A support engineer is actively looking into it and will assist you as soon as they have an update. I will closely monitor this issue and update here once we have our findings ready.

@CHEEKATLAPRADEEP-MSFT Thank you for your reply. I am looking forward to your response regarding this matter. I hope my request was clear and accurate. Briefly, how can we set up an ACI container to send data through a Stream Analytics Machine Learning Function? The Function Signature of the scoring URI of an ACI container is not recognized by Stream Analytics Functions, contrary to the AKS cluster's scoring URI of which the function signature is recognized.

@CHEEKATLAPRADEEP-MSFT-zz
Copy link
Contributor

@sidramadoss Could you please add your insight on this issue?

@NikosSpanos
Copy link
Author

@sidramadoss Could you please add your insight on this issue?

@sidramadoss Do you have any solution regarding this thread? Thank you in advance for your attention on this issue.

@sidramadoss
Copy link
Contributor

@NikosSpanos - at this time of public preview we are supporting ML models deployed on AKS. We are working on adding support for models deployed on ACI as well. This should be available within the next few weeks. Can you try deploying your model to AKS instead and giving it a shot? That should work.

@NikosSpanos
Copy link
Author

NikosSpanos commented Apr 17, 2020

@NikosSpanos - at this time of public preview we are supporting ML models deployed on AKS. We are working on adding support for models deployed on ACI as well. This should be available within the next few weeks. Can you try deploying your model to AKS instead and giving it a shot? That should work.

@sidramadoss Thank you for your reply. As already noted on my initial thread, I did try the AKS cluster deployment on a function of Azure Stream Analytics job and indeed it worked. By "worked" I mean that the function signature of the AKS scoring API was successfully recognized. Contrary to the ACI scoring API which was not recognized.

Since the Machine Learning Service Function on Azure Stream Analytics Job offer the option of ACI container, I was curious how the service could not be recognized since you already offer it. My point is that if the ACI container instance cannot be used through Stream Analytics Job then don't add it as an option in the first place. Because if I want to sell this option to a client then why I shouldn't go with a cheaper option, deploying a model on ACI container, instead of selling to my client the more expensive option which is the AKS cluster. Since you offer both (ACI + AKS), they both should fit with Azure Stream Jobs.

@sidramadoss
Copy link
Contributor

@NikosSpanos - Thanks for calling this out. We should've been more clear about the staggered rolled out of supported scenarios. We have updated our docs with this limitation.

We prioritized AKS first as this is the recommended option for real-time inferencing. However, I do understand that dev/test will happen on ACI which is why we are working actively on adding support for it after making sure it scales well for real-time inferencing use cases.

@NikosSpanos
Copy link
Author

@sidramadoss Thank you for the update. I am glad that at least I could help on clearing this out. Should we close this issue for now, or shall keep it open?

@mamccrea
Copy link
Contributor

We'll close this issue for now. If you have any further questions, please feel free to reopen the issue.

#please-close

Copy link

I have a similar issue. When I follow the tutorial above with an ACI deployment, I can't create an Azure Machine Learning Service function. The "Function signature" reads "input needed". However I have specified the inference schema in my score.py and the endpoint has the swagger URI.

@sidramadoss
Copy link
Contributor

@jonrbates - we are working on enabling this on the portal in the next week or two. For now, you can use the following workaround to get it to work manually:

  1. On portal, under Functions, select Add -> Azure ML Service
  2. Select "Provide Azure Machine Learning function settings manually"
  3. Paste in your Scoring URI that you can find from Azure ML workspace.
  4. Provide any dummy key. You should see Function signature show up if you have an associated swagger URI.

@jonrbates
Copy link

Ok thank you for the quick reply!

@sidramadoss
Copy link
Contributor

@jonrbates , @NikosSpanos - we added support for models deployed on ACI as well. This is available today when you use the Azure portal and will be available in ASA tools for Visual Studio in the next few weeks.

@peter93
Copy link

peter93 commented Nov 20, 2020

I have a similar issue. When I follow the tutorial above with an ACI deployment, I can't create an Azure Machine Learning Service function. The "Function signature" reads "Your deployment does not have an associated swagger.json". However I have specified the inference schema in my score.py and the endpoint has the swagger URI.

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

No branches or pull requests

9 participants