PlainML.Infrastructure
0.1.185
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package PlainML.Infrastructure --version 0.1.185
NuGet\Install-Package PlainML.Infrastructure -Version 0.1.185
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PlainML.Infrastructure" Version="0.1.185" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add PlainML.Infrastructure --version 0.1.185
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: PlainML.Infrastructure, 0.1.185"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install PlainML.Infrastructure as a Cake Addin #addin nuget:?package=PlainML.Infrastructure&version=0.1.185 // Install PlainML.Infrastructure as a Cake Tool #tool nuget:?package=PlainML.Infrastructure&version=0.1.185
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
PlainML
This library should simplify the tracking process of Machine-Learning (ML) training tasks. When you train a ML-model you can save parameters and metrics of the training attempts (named as "runs"). Also you can store artifacts and deploy it to a deploymenttarget like "dev" or "prod". On this way you can access them on an client application the deployed model.
Features
- Experimenttracking (Runs with parameters, metrics and artifacts)
- Integration of trainingprocesses
- Deployment to different targets (dev, production)
- Manage artifacts (deployment, caching)
- Visualization
Getting Started
- Install VSCode
- Install C# extensions for VSCode
- Create project
mkdir PlainMLExample cd PlainMLExample dotnet new console
- Install nuget package to project
dotnet add package PlainML dotnet add package PlainML.Infrastructure
- Add usings on the top of program.cs-File
using Microsoft.Extensions.DependencyInjection; using PlainML; using PlainML.Entities; using PlainML.Infrastructure;
- Use dependency injection to configure services
var _provider = new ServiceCollection() .UsePlainMLSqLite() // other providers like SQL-Server are avaiable .UseArtifactStorageFilesystem() // other providers like SQL-Server are avaiable .AddTransient<PlainMLService>() .BuildServiceProvider();
- Apply migration when init the database the first time or a new major version is avaiable
var s = new PlainMLService(dbContextFactory, artifactStorage); await s.Migrate();
- Use code
const string experimentName = "TestExperiment"; const string artifactsPath = "./Artifacts"; // Create database PlainMLService s = _provider.GetRequiredService<PlainMLService>(); await s.Migrate(); // Train model int rundId = await s.StartRun(experimentName); float metricValue = await TrainModel(artifactsPath); await s.EndRun( rundId, parameters: new[] { new Parameter(){ Name = "Parameter1", Value = 1.123f } }, parameters_StringType: new[] { new Parameter_StringType(){ Name = "Trainers", Value = "LightGbm, OneVersusAllTrainer" } }, metrics: new[] { new Metric(){ Name = "MicroAccuracy", Value = metricValue } }, artifactsPath); // Deploy model await s.DeployRun(rundId); // Use model var deployedRun = await s.GetDeployedRun(experimentName) ?? throw new NullReferenceException(); await s.DownloadArtifacts(deployedRun.Id, "./DownloadedArtifacts"); Console.WriteLine("Artifacts of run in ./DownloadedArtifacts:"); foreach (var item in Directory.EnumerateFiles("./DownloadedArtifacts")) { Console.WriteLine(item); } async static Task<float> TrainModel(string artifactsPath) { Console.WriteLine("Training..."); await Task.Delay(100); if (Directory.Exists(artifactsPath)) { Console.WriteLine("Directory exists. Delete it!"); Directory.Delete(artifactsPath, true); } Directory.CreateDirectory(artifactsPath); await File.WriteAllTextAsync(Path.Combine(artifactsPath, "TestFile.bin"), "0011010101001"); return 0.1f; }
Examples
NuGet Packages
- https://www.nuget.org/packages/PlainML/
- https://www.nuget.org/packages/PlainML.Infrastructure/
- https://www.nuget.org/packages/PlainML.Core/
Roadmap
- Develop unstable version 0.0.*
- Create initial stable version 1.0.0
- ML.Net integration
- Create docs
- Rest-interface
- Web-interface for visualization and Manage Experiments (run-table, graphs,...)
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. 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 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- Microsoft.Data.Sqlite.Core (>= 7.0.2)
- Microsoft.EntityFrameworkCore (>= 7.0.2)
- Microsoft.EntityFrameworkCore.InMemory (>= 7.0.2)
- Microsoft.EntityFrameworkCore.Sqlite (>= 7.0.2)
- Microsoft.EntityFrameworkCore.SqlServer (>= 7.0.2)
- Microsoft.Extensions.DependencyInjection (>= 7.0.0)
- PlainML (>= 0.1.185)
- PlainML.Core (>= 0.1.185)
-
net7.0
- Microsoft.Data.Sqlite.Core (>= 7.0.2)
- Microsoft.EntityFrameworkCore (>= 7.0.2)
- Microsoft.EntityFrameworkCore.InMemory (>= 7.0.2)
- Microsoft.EntityFrameworkCore.Sqlite (>= 7.0.2)
- Microsoft.EntityFrameworkCore.SqlServer (>= 7.0.2)
- Microsoft.Extensions.DependencyInjection (>= 7.0.0)
- PlainML (>= 0.1.185)
- PlainML.Core (>= 0.1.185)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.1.192 | 333 | 1/25/2023 |
0.1.191 | 309 | 1/25/2023 |
0.1.189 | 307 | 1/25/2023 |
0.1.185 | 292 | 1/25/2023 |
0.0.184 | 300 | 1/25/2023 |
0.0.179 | 295 | 1/25/2023 |
0.0.171 | 303 | 1/25/2023 |
0.0.165 | 300 | 1/24/2023 |
0.0.157 | 294 | 1/24/2023 |
0.0.155 | 310 | 1/24/2023 |
0.0.148 | 298 | 1/24/2023 |
0.0.141 | 310 | 1/24/2023 |
0.0.138 | 299 | 1/24/2023 |
0.0.137 | 307 | 1/23/2023 |
0.0.135 | 312 | 1/23/2023 |
0.0.133 | 322 | 1/23/2023 |
0.0.118 | 299 | 1/22/2023 |
0.0.117 | 313 | 1/21/2023 |
0.0.116 | 305 | 1/21/2023 |
0.0.115 | 297 | 1/21/2023 |
0.0.112 | 312 | 1/21/2023 |
0.0.111 | 318 | 1/21/2023 |
0.0.97 | 309 | 1/18/2023 |
0.0.91 | 300 | 1/18/2023 |
0.0.90 | 310 | 1/18/2023 |
0.0.88 | 311 | 1/18/2023 |
0.0.86 | 302 | 1/18/2023 |
0.0.85 | 303 | 1/18/2023 |
0.0.84 | 324 | 1/18/2023 |