Skip to content

Commit 31d2269

Browse files
committed
Extend a comment to mention that extracting labels is a temporal solution
1 parent 6f3c4dd commit 31d2269

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docs/samples/Microsoft.ML.Samples/Static/LightGBMMulticlassWithInMemoryData.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using Microsoft.ML.Data;
22
using Microsoft.ML.LightGBM.StaticPipe;
3-
using Microsoft.ML.Runtime.Data;
43
using Microsoft.ML.StaticPipe;
54
using System;
65
using System.Collections.Generic;
@@ -138,8 +137,10 @@ public void MultiClassLightGbmStaticPipelineWithInMemoryData()
138137
// Convert prediction in ML.NET format to native C# class.
139138
var nativePredictions = new List<NativeExample>(prediction.AsDynamic.AsEnumerable<NativeExample>(mlContext, false));
140139

141-
// Get cchema object of the prediction. It contains metadata such as the mapping from predicted label index
142-
// (e.g., 1) to its actual label (e.g., "AA").
140+
// Get schema object out of the prediction. It contains metadata such as the mapping from predicted label index
141+
// (e.g., 1) to its actual label (e.g., "AA"). The call to "AsDynamic" converts our statically-typed pipeline into
142+
// a dynamically-typed one only for extracting metadata. In the future, metadata in statically-typed pipeline should
143+
// be accessible without dynamically-typed things.
143144
var schema = prediction.AsDynamic.Schema;
144145

145146
// Retrieve the mapping from labels to label indexes.

0 commit comments

Comments
 (0)