How should I make the input format. Azure, API with C#

사람꽃 5 Reputation points
2023-04-24T08:36:19.69+00:00

         static void Main(string[] args)
        {
            InvokeRequestResponseService().Wait();
        }

        static async Task InvokeRequestResponseService()
        {
        .............
         *** var requestBody = @"{
                  ""input_data"": {
                    ""columns"": [
                      ""pclass"",
                      ""gender"",
                      ""age"",
                      ""sibsp"",
                      ""embarked""
                    ],
                    ""index"": [],
                    ""data"": []
                  }
                }";   *** 
 


The input part of the code generated by "Consume" of "endpoints in azure ml".
Show me an example of what form the above should be filled in.



-----------------------------

The bottom one was filled like this.

var requestBody = @"{
                        ""Inputs"": {
                          ""data"": [
                            {
                             ""pclass"": 2,
                              ""gender"":""female"",
                              ""age"": 70.0,
                              ""sibsp"": 0,
                              ""embarked"":""C""
                            }
                          ]
                        },
                        ""GlobalParameters"": {
                          ""method"": ""predict""
                        }
                      }";

Azure Machine Learning
Developer technologies | C#
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
{count} votes

1 answer

Sort by: Most helpful
  1. romungi-MSFT 49,086 Reputation points Microsoft Employee Moderator
    2023-04-24T14:33:41.88+00:00

    @사람꽃 The consume page has a snippet of code that can be used for C#, Python and R to format the input parameters as displayed below:

    User's image

    Do you see the same on your endpoint consume page? Thanks!!

    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    1 person found this answer 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.