SimpleAzureML 1.0.3
dotnet add package SimpleAzureML --version 1.0.3
NuGet\Install-Package SimpleAzureML -Version 1.0.3
<PackageReference Include="SimpleAzureML" Version="1.0.3" />
paket add SimpleAzureML --version 1.0.3
#r "nuget: SimpleAzureML, 1.0.3"
// Install SimpleAzureML as a Cake Addin #addin nuget:?package=SimpleAzureML&version=1.0.3 // Install SimpleAzureML as a Cake Tool #tool nuget:?package=SimpleAzureML&version=1.0.3
SimpleAzureML
.NET SDK for Azure Machine Learning Web Services (AMLWS)
Simple Azure Machine Learning SDK provides easy way how to use AMLWS. Via this SDK you can do Response-Request Service requests by few lines.
How to install package
Install with NuGet (recommended)
PM> Install-Package SimpleAzureML
Works for .NET applications
- .NET Standard 2.0
- .NET Framework 4.6.1
- .NET Framework 4.6
- .NET Framework 4.5.2
- .NET Framework 4.5.1
Prerequisites
- Newtonsoft.Json
Usage
Initialize SimpleAzure.Client
Create instance of SimpleAzure.Client, with arguments:
- AMLWS's URL (looks like
https://ussouthcentral.services.azureml.net/workspaces/xxxxxx/services/yyyyyyyy/execute?api-version=2.0&format=swagger
) - AMLWS's API key
sample code:
var simpleAzureMlClient = new SimpleAzureML.Client(
"!----AMLWS-URL----!",
"!----AMLWS-API-KEY----!"
);
Request-Response Service request
Request model
RRS use RRSScoreGenericRequestModel
for requests.
This model contains only key-value<string,object> pair inputs for web service.
sample code:
var myRequest = new RRSScoreGenericRequestModel()
{
{"myColumnString", "my string"},
{"myColumnInt", 2}
};
Do RRS requests
Single request
Use DoRRSRequest
method of SimpleAzureML.Client with request as parameter.
sample code:
var myRequest = new RRSScoreGenericRequestModel()
{
{"hour", 10},
{"minute", 22},
{"freeParkingSpacesCount", 0}
};
var response = await simpleAzureMlClient.DoRRSRequest(myRequest);
Multiple requests
You can combine more request in one call.
Use DoRRSRequest
method of SimpleAzureML.Client with List of requests as parameter.
sample code:
var myRequests = new List<RRSScoreGenericRequestModel>();
var myRequest = new RRSScoreGenericRequestModel()
{
{"hour", 10},
{"minute", 22},
{"freeParkingSpacesCount", 0}
};
myRequests.Add(myRequest);
var myRequest2 = new RRSScoreGenericRequestModel()
{
{"hour", 10},
{"minute", 23},
{"freeParkingSpacesCount", 0}
};
myRequests.Add(myRequest2);
var response = await simpleAzureMlClient.DoRRSRequest(myRequests);
Response model
RRSScoreGenericResponseModel
is used for response from RRS. Results from RRS endpoint are inside response.Results.Output1
.
sample code:
foreach (var myResponse in response.Results.Output1.Select((values, i) => new { i, values }))
{
Console.WriteLine("=== Result #" + myResponse.i);
foreach(var myData in myResponse.values)
{
Console.WriteLine(" "+ myData.Key +": " + myData.Value);
}
}
sample output:
=== Result #0
freeParkingSpacesCount: 133
=== Result #1
freeParkingSpacesCount: 118
=== Result #2
freeParkingSpacesCount: 22
Batch Execution request
(Batch Execution requests support coming soon..)
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net451 is compatible. net452 is compatible. net46 is compatible. net461 is compatible. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.5.1
- Microsoft.Net.Http (>= 2.2.29)
- Newtonsoft.Json (>= 11.0.2)
-
.NETFramework 4.5.2
- Microsoft.Net.Http (>= 2.2.29)
- Newtonsoft.Json (>= 11.0.2)
-
.NETFramework 4.6
- Microsoft.Net.Http (>= 2.2.29)
- Newtonsoft.Json (>= 11.0.2)
-
.NETFramework 4.6.1
- Microsoft.Net.Http (>= 2.2.29)
- Newtonsoft.Json (>= 11.0.2)
-
.NETStandard 2.0
- Newtonsoft.Json (>= 11.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
added support for .NET Framework 4.5.1, added docs