Skip to content

Commit 48a8134

Browse files
committed
clean
1 parent 1b67219 commit 48a8134

File tree

4 files changed

+20
-8
lines changed

4 files changed

+20
-8
lines changed

src/Microsoft.ML.AutoML/CodeGen/question-answering.json renamed to src/Microsoft.ML.AutoML/CodeGen/question_answering_search_space.json

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"$schema": "./search-space-schema.json#",
3-
"name": "question_answering _option",
3+
"name": "question_answering_option",
44
"search_space": [
55
{
66
"name": "ContextColumnName",
77
"type": "string",
88
"default": "Context"
99
},
1010
{
11-
"name": " QuestionColumnName",
11+
"name": "QuestionColumnName",
1212
"type": "string",
1313
"default": "Question"
1414
},
@@ -42,6 +42,11 @@
4242
"type": "integer",
4343
"default": 10
4444
},
45+
{
46+
"name": "TopKAnswers",
47+
"type": "integer",
48+
"default": 3
49+
},
4550
{
4651
"name": "Architecture",
4752
"type": "bertArchitecture",

src/Microsoft.ML.AutoML/CodeGen/search-space-schema.json

+8-2
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@
147147
"text_classification_option",
148148
"sentence_similarity_option",
149149
"object_detection_option",
150-
"question_answering _option"
150+
"question_answering_option"
151151
]
152152
},
153153
"option_name": {
@@ -211,7 +211,13 @@
211211
"Steps",
212212
"MaxEpoch",
213213
"InitLearningRate",
214-
"WeightDecay"
214+
"WeightDecay",
215+
"ContextColumnName",
216+
"QuestionColumnName",
217+
"TrainingAnswerColumnName",
218+
"AnswerIndexStartColumnName",
219+
"predictedAnswerColumnName",
220+
"TopKAnswers"
215221
]
216222
},
217223
"option_type": {

src/Microsoft.ML.AutoML/Microsoft.ML.AutoML.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
<AdditionalFiles Include="CodeGen\code_gen_flag.json" />
7070
<AdditionalFiles Include="CodeGen\*-estimators.json" />
7171
</ItemGroup>
72-
72+
7373
<ItemGroup>
7474
<EmbeddedResource Include="Tuner\Portfolios.json">
7575
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

src/Microsoft.ML.AutoML/CodeGen/QuestionAnswering.cs renamed to src/Microsoft.ML.AutoML/SweepableEstimator/Estimators/QuestionAnswering.cs

+4-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
namespace Microsoft.ML.AutoML.CodeGen
99
{
10-
internal class QuestionAnsweringMulti
10+
internal partial class QuestionAnsweringMulti
1111
{
12-
public IEstimator<ITransformer> BuildFromOption(MLContext context, QATrainer.Options param)
12+
public override IEstimator<ITransformer> BuildFromOption(MLContext context, QuestionAnsweringOption param)
1313
{
1414
return context.MulticlassClassification.Trainers.QuestionAnswer(
1515
contextColumnName: param.ContextColumnName,
@@ -19,9 +19,10 @@ public IEstimator<ITransformer> BuildFromOption(MLContext context, QATrainer.Opt
1919
predictedAnswerColumnName: param.PredictedAnswerColumnName,
2020
scoreColumnName: param.ScoreColumnName,
2121
batchSize: param.BatchSize,
22-
maxEpochs: param.MaxEpoch,
22+
maxEpochs: param.MaxEpochs,
2323
topK: param.TopKAnswers,
2424
architecture: BertArchitecture.Roberta);
2525
}
26+
2627
}
2728
}

0 commit comments

Comments
 (0)