PlainML.Core 0.1.192

.NET 6.0
dotnet add package PlainML.Core --version 0.1.192
NuGet\Install-Package PlainML.Core -Version 0.1.192
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.Core" Version="0.1.192" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add PlainML.Core --version 0.1.192
#r "nuget: PlainML.Core, 0.1.192"
#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.Core as a Cake Addin
#addin nuget:?package=PlainML.Core&version=0.1.192

// Install PlainML.Core as a Cake Tool
#tool nuget:?package=PlainML.Core&version=0.1.192

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.

build

Features

  • Experimenttracking (Runs with parameters, metrics and artifacts)
  • Integration of trainingprocesses
  • Deployment to different targets (dev, production)
  • Manage artifacts (deployment, caching)
  • Visualization

Getting Started

  1. Install VSCode
  2. Install C# extensions for VSCode
  3. Create project
    mkdir PlainMLExample
    cd PlainMLExample
    dotnet new console
    
  4. Install nuget package to project
    dotnet add package PlainML
    dotnet add package PlainML.Infrastructure
    
  5. Add usings on the top of program.cs-File
    using Microsoft.Extensions.DependencyInjection;
    using PlainML;
    using PlainML.Entities;
    using PlainML.Infrastructure;
    
  6. 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();
    
  7. 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();
    
  8. 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

Roadmap

  • Develop unstable version 0.1.*
  • 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
.NET net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.
  • net6.0

    • No dependencies.
  • net7.0

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on PlainML.Core:

Package Downloads
PlainML

This library should simplify the tracking process of Machine-Learning training tasks.

PlainML.Infrastructure

This library should simplify the tracking process of Machine-Learning training tasks.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.1.192 167 1/25/2023
0.1.191 158 1/25/2023
0.1.189 154 1/25/2023
0.1.185 161 1/25/2023
0.0.184 162 1/25/2023
0.0.179 155 1/25/2023
0.0.171 162 1/25/2023
0.0.165 166 1/24/2023
0.0.157 157 1/24/2023
0.0.155 170 1/24/2023
0.0.148 160 1/24/2023
0.0.141 133 1/24/2023
0.0.138 128 1/24/2023
0.0.137 141 1/23/2023
0.0.135 143 1/23/2023
0.0.133 134 1/23/2023
0.0.118 127 1/22/2023
0.0.117 127 1/21/2023
0.0.116 126 1/21/2023
0.0.115 128 1/21/2023
0.0.112 126 1/21/2023
0.0.111 134 1/21/2023
0.0.100 134 1/18/2023
0.0.97 126 1/18/2023
0.0.92 126 1/18/2023
0.0.91 128 1/18/2023
0.0.90 129 1/18/2023
0.0.88 133 1/18/2023
0.0.86 128 1/18/2023
0.0.85 138 1/18/2023
0.0.84 165 1/18/2023