-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathStartup.cs
More file actions
36 lines (31 loc) · 958 Bytes
/
Copy pathStartup.cs
File metadata and controls
36 lines (31 loc) · 958 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using MLFlow.NET.Lib;
using MLFlow.NET.Lib.Contract;
using MLFlow.NET.Lib.Model;
namespace MLNETMLFlowSampleConsole
{
public class Startup
{
private readonly IConfiguration Configuration;
public IServiceProvider Services;
public Startup()
{
Configuration =
new ConfigurationBuilder()
.AddJsonFile("appsettings.json", false)
.Build();
}
public void ConfigureServices()
{
var services = new ServiceCollection();
// Add and configure MLFlow Service
services.AddMFlowNet();
services.Configure<MLFlowConfiguration>(
Configuration.GetSection(nameof(MLFlowConfiguration))
);
Services = services.BuildServiceProvider();
}
}
}