Skip to content

Commit 79314bf

Browse files
vinodshanbhagDmitry-A
authored andcommitted
API folder changes (dotnet#6)
1 parent 5e95fd9 commit 79314bf

6 files changed

+250
-248
lines changed

src/AutoML/API/AutoFitSettings.cs

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
using System.Collections.Generic;
2+
using System.Diagnostics;
3+
4+
namespace Microsoft.ML.Auto
5+
{
6+
public class AutoFitSettings
7+
{
8+
public ExperimentStoppingCriteria StoppingCriteria = new ExperimentStoppingCriteria();
9+
internal IterationStoppingCriteria IterationStoppingCriteria;
10+
internal Concurrency Concurrency;
11+
internal Filters Filters;
12+
internal CrossValidationSettings CrossValidationSettings;
13+
internal OptimizingMetric OptimizingMetric;
14+
internal bool EnableEnsembling;
15+
internal bool EnableModelExplainability;
16+
internal bool EnableAutoTransformation;
17+
18+
// spec question: Are following automatic or a user setting?
19+
internal bool EnableSubSampling;
20+
internal bool EnableCaching;
21+
internal bool ExternalizeTraining;
22+
internal TraceLevel TraceLevel; // Should this be controlled through code or appconfig?
23+
}
24+
25+
public class ExperimentStoppingCriteria
26+
{
27+
public int MaxIterations = 100;
28+
public int TimeOutInMinutes = 300;
29+
internal bool StopAfterConverging;
30+
internal double ExperimentExitScore;
31+
}
32+
33+
internal class Filters
34+
{
35+
internal IEnumerable<Trainers> WhitelistTrainers;
36+
internal IEnumerable<Trainers> BlackListTrainers;
37+
internal IEnumerable<Transformers> WhitelistTransformers;
38+
internal IEnumerable<Transformers> BlacklistTransformers;
39+
internal bool PreferExplainability;
40+
internal bool PreferInferenceSpeed;
41+
internal bool PreferSmallDeploymentSize;
42+
internal bool PreferSmallMemoryFootprint;
43+
}
44+
45+
public class IterationStoppingCriteria
46+
{
47+
internal int TimeOutInSeconds;
48+
internal bool TerminateOnLowAccuracy;
49+
}
50+
51+
public class Concurrency
52+
{
53+
internal int MaxConcurrentIterations;
54+
internal int MaxCoresPerIteration;
55+
}
56+
57+
internal enum Trainers
58+
{
59+
}
60+
61+
internal enum Transformers
62+
{
63+
}
64+
65+
internal class CrossValidationSettings
66+
{
67+
internal int NumberOfFolds;
68+
internal int ValidationSizePercentage;
69+
internal IEnumerable<string> StratificationColumnNames;
70+
}
71+
}

src/AutoML/API/InferenceException.cs

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
using System;
2+
3+
namespace Microsoft.ML.Auto
4+
{
5+
public enum InferenceType
6+
{
7+
Seperator,
8+
Header,
9+
Label,
10+
Task,
11+
ColumnDataKind,
12+
ColumnPurpose,
13+
Tranform,
14+
Trainer,
15+
Hyperparams,
16+
ColumnSplit
17+
}
18+
19+
public class InferenceException : Exception
20+
{
21+
public InferenceType InferenceType;
22+
23+
public InferenceException(InferenceType inferenceType, string message)
24+
: base(message)
25+
{
26+
}
27+
28+
public InferenceException(InferenceType inferenceType, string message, Exception inner)
29+
: base(message, inner)
30+
{
31+
}
32+
}
33+
34+
}

0 commit comments

Comments
 (0)