Skip to content

Commit 5fd88bf

Browse files
committed
Remaining
1 parent b538e5e commit 5fd88bf

File tree

21 files changed

+29
-29
lines changed

21 files changed

+29
-29
lines changed

src/Microsoft.ML.Data/Depricated/Instances/HeaderSchema.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ private static VersionInfo GetVersionInfo()
151151
loaderAssemblyName: typeof(FeatureNameCollection).Assembly.FullName);
152152
}
153153

154-
public static void Save(ModelSaveContext ctx, in VBuffer<ReadOnlyMemory<char>> names)
154+
internal static void Save(ModelSaveContext ctx, in VBuffer<ReadOnlyMemory<char>> names)
155155
{
156156
Contracts.AssertValue(ctx);
157157
ctx.CheckAtModel();

src/Microsoft.ML.FastTree/TreeEnsemble/InternalQuantileRegressionTree.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public InternalQuantileRegressionTree(byte[] buffer, ref int position)
5050
_instanceWeights = buffer.ToDoubleArray(ref position);
5151
}
5252

53-
public override void Save(ModelSaveContext ctx)
53+
internal override void Save(ModelSaveContext ctx)
5454
{
5555
// *** Binary format ***
5656
// double[]: Labels Distribution.

src/Microsoft.ML.FastTree/TreeEnsemble/InternalRegressionTree.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ protected void Save(ModelSaveContext ctx, TreeType code)
409409
writer.WriteDoubleArray(_previousLeafValue);
410410
}
411411

412-
public virtual void Save(ModelSaveContext ctx)
412+
internal virtual void Save(ModelSaveContext ctx)
413413
{
414414
Save(ctx, TreeType.Regression);
415415
}

src/Microsoft.ML.FastTree/TreeEnsemble/InternalTreeEnsemble.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public InternalTreeEnsemble(ModelLoadContext ctx, bool usingDefaultValues, bool
5656
_firstInputInitializationContent = ctx.LoadStringOrNull();
5757
}
5858

59-
public void Save(ModelSaveContext ctx)
59+
internal void Save(ModelSaveContext ctx)
6060
{
6161
// *** Binary format ***
6262
// int: Number of trees

src/Microsoft.ML.FastTree/TreeEnsembleFeaturizer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ public TreeEnsembleFeaturizerBindableMapper(IHostEnvironment env, ModelLoadConte
387387
_totalLeafCount = CountLeaves(_ensemble);
388388
}
389389

390-
public void Save(ModelSaveContext ctx)
390+
void ICanSaveModel.Save(ModelSaveContext ctx)
391391
{
392392
_host.CheckValue(ctx, nameof(ctx));
393393
ctx.CheckAtModel();

src/Microsoft.ML.HalLearners/VectorWhitening.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ private static void TrainModels(IHostEnvironment env, IChannel ch, float[][] col
464464
}
465465
}
466466

467-
public override void Save(ModelSaveContext ctx)
467+
private protected override void SaveModel(ModelSaveContext ctx)
468468
{
469469
Host.CheckValue(ctx, nameof(ctx));
470470
ctx.CheckAtModel();

src/Microsoft.ML.ImageAnalytics/ImageGrayscale.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx,
141141
private static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, Schema inputSchema)
142142
=> Create(env, ctx).MakeRowMapper(inputSchema);
143143

144-
public override void Save(ModelSaveContext ctx)
144+
private protected override void SaveModel(ModelSaveContext ctx)
145145
{
146146
Host.CheckValue(ctx, nameof(ctx));
147147

src/Microsoft.ML.ImageAnalytics/ImageLoader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ protected override void CheckInputColumn(Schema inputSchema, int col, int srcCol
138138
throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", ColumnPairs[col].inputColumnName, TextType.Instance.ToString(), inputSchema[srcCol].Type.ToString());
139139
}
140140

141-
public override void Save(ModelSaveContext ctx)
141+
private protected override void SaveModel(ModelSaveContext ctx)
142142
{
143143
Host.CheckValue(ctx, nameof(ctx));
144144

src/Microsoft.ML.ImageAnalytics/ImagePixelExtractor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx,
252252
private static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, Schema inputSchema)
253253
=> Create(env, ctx).MakeRowMapper(inputSchema);
254254

255-
public override void Save(ModelSaveContext ctx)
255+
private protected override void SaveModel(ModelSaveContext ctx)
256256
{
257257
Host.CheckValue(ctx, nameof(ctx));
258258

src/Microsoft.ML.ImageAnalytics/ImageResizer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx,
235235
private static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, Schema inputSchema)
236236
=> Create(env, ctx).MakeRowMapper(inputSchema);
237237

238-
public override void Save(ModelSaveContext ctx)
238+
private protected override void SaveModel(ModelSaveContext ctx)
239239
{
240240
Host.CheckValue(ctx, nameof(ctx));
241241

src/Microsoft.ML.ImageAnalytics/VectorToImageTransform.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ public ColInfoEx(ModelLoadContext ctx)
195195
Interleave = ctx.Reader.ReadBoolByte();
196196
}
197197

198-
public void Save(ModelSaveContext ctx)
198+
internal void Save(ModelSaveContext ctx)
199199
{
200200
Contracts.AssertValue(ctx);
201201

@@ -306,7 +306,7 @@ public static VectorToImageTransform Create(IHostEnvironment env, ModelLoadConte
306306
});
307307
}
308308

309-
public override void Save(ModelSaveContext ctx)
309+
private protected override void SaveModel(ModelSaveContext ctx)
310310
{
311311
Host.CheckValue(ctx, nameof(ctx));
312312
ctx.CheckAtModel();

src/Microsoft.ML.OnnxTransform/OnnxTransform.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ public OnnxTransformer(IHostEnvironment env, string[] outputColumnNames, string[
261261
{
262262
}
263263

264-
public override void Save(ModelSaveContext ctx)
264+
private protected override void SaveModel(ModelSaveContext ctx)
265265
{
266266
Host.AssertValue(ctx);
267267

@@ -368,7 +368,7 @@ private protected override Func<int, bool> GetDependenciesCore(Func<int, bool> a
368368
return col => Enumerable.Range(0, _parent.Outputs.Length).Any(i => activeOutput(i)) && _inputColIndices.Any(i => i == col);
369369
}
370370

371-
public override void Save(ModelSaveContext ctx) => _parent.Save(ctx);
371+
private protected override void SaveModel(ModelSaveContext ctx) => _parent.SaveModel(ctx);
372372

373373
private interface INamedOnnxValueGetter
374374
{

src/Microsoft.ML.PCA/PcaTransformer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public TransformInfo(ModelLoadContext ctx)
140140
Contracts.CheckDecode(MeanProjected == null || (MeanProjected.Length == Rank && FloatUtils.IsFinite(MeanProjected)));
141141
}
142142

143-
public void Save(ModelSaveContext ctx)
143+
internal void Save(ModelSaveContext ctx)
144144
{
145145
Contracts.AssertValue(ctx);
146146

@@ -279,7 +279,7 @@ private static PrincipalComponentAnalysisTransformer Create(IHostEnvironment env
279279
return new PrincipalComponentAnalysisTransformer(host, ctx);
280280
}
281281

282-
public override void Save(ModelSaveContext ctx)
282+
private protected override void SaveModel(ModelSaveContext ctx)
283283
{
284284
Host.CheckValue(ctx, nameof(ctx));
285285
ctx.CheckAtModel();

src/Microsoft.ML.Parquet/ParquetLoader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ public RowCursor[] GetRowCursorSet(IEnumerable<DataViewSchema.Column> columnsNee
406406
return new RowCursor[] { GetRowCursor(columnsNeeded, rand) };
407407
}
408408

409-
public void Save(ModelSaveContext ctx)
409+
void ICanSaveModel.Save(ModelSaveContext ctx)
410410
{
411411
Contracts.CheckValue(ctx, nameof(ctx));
412412
ctx.CheckAtModel();

src/Microsoft.ML.Parquet/PartitionedFileLoader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ public static PartitionedFileLoader Create(IHostEnvironment env, ModelLoadContex
253253
ch => new PartitionedFileLoader(host, ctx, files));
254254
}
255255

256-
public void Save(ModelSaveContext ctx)
256+
void ICanSaveModel.Save(ModelSaveContext ctx)
257257
{
258258
Contracts.CheckValue(ctx, nameof(ctx));
259259
ctx.CheckAtModel();

src/Microsoft.ML.Parquet/PartitionedPathParser.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public static SimplePartitionedPathParser Create(IHostEnvironment env, ModelLoad
148148
ch => new SimplePartitionedPathParser(host, ctx));
149149
}
150150

151-
public void Save(ModelSaveContext ctx)
151+
void ICanSaveModel.Save(ModelSaveContext ctx)
152152
{
153153
Contracts.CheckValue(ctx, nameof(ctx));
154154
ctx.SetVersionInfo(GetVersionInfo());
@@ -261,7 +261,7 @@ public static ParquetPartitionedPathParser Create(IHostEnvironment env, ModelLoa
261261
ch => new ParquetPartitionedPathParser(host, ctx));
262262
}
263263

264-
public void Save(ModelSaveContext ctx)
264+
void ICanSaveModel.Save(ModelSaveContext ctx)
265265
{
266266
Contracts.CheckValue(ctx, nameof(ctx));
267267
ctx.SetVersionInfo(GetVersionInfo());

src/Microsoft.ML.Recommender/MatrixFactorizationPredictor.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public static MatrixFactorizationPredictor Create(IHostEnvironment env, ModelLoa
142142
/// <summary>
143143
/// Save model to the given context
144144
/// </summary>
145-
public void Save(ModelSaveContext ctx)
145+
void ICanSaveModel.Save(ModelSaveContext ctx)
146146
{
147147
ctx.CheckAtModel();
148148
ctx.SetVersionInfo(GetVersionInfo());
@@ -375,7 +375,7 @@ public Row GetRow(Row input, Func<int, bool> active)
375375
}
376376
}
377377

378-
public sealed class MatrixFactorizationPredictionTransformer : PredictionTransformerBase<MatrixFactorizationPredictor, GenericScorer>, ICanSaveModel
378+
public sealed class MatrixFactorizationPredictionTransformer : PredictionTransformerBase<MatrixFactorizationPredictor, GenericScorer>
379379
{
380380
public const string LoaderSignature = "MaFactPredXf";
381381
public string MatrixColumnIndexColumnName { get; }
@@ -469,7 +469,7 @@ public override Schema GetOutputSchema(Schema inputSchema)
469469
return Transform(new EmptyDataView(Host, inputSchema)).Schema;
470470
}
471471

472-
public void Save(ModelSaveContext ctx)
472+
private protected override void SaveModel(ModelSaveContext ctx)
473473
{
474474
Host.CheckValue(ctx, nameof(ctx));
475475
ctx.CheckAtModel();

src/Microsoft.ML.StandardLearners/FactorizationMachine/FieldAwareFactorizationMachineModelParameters.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ public float[] GetLatentWeights()
283283
}
284284
}
285285

286-
public sealed class FieldAwareFactorizationMachinePredictionTransformer : PredictionTransformerBase<FieldAwareFactorizationMachineModelParameters, BinaryClassifierScorer>, ICanSaveModel
286+
public sealed class FieldAwareFactorizationMachinePredictionTransformer : PredictionTransformerBase<FieldAwareFactorizationMachineModelParameters, BinaryClassifierScorer>
287287
{
288288
public const string LoaderSignature = "FAFMPredXfer";
289289

@@ -389,7 +389,7 @@ public override Schema GetOutputSchema(Schema inputSchema)
389389
/// Saves the transformer to file.
390390
/// </summary>
391391
/// <param name="ctx">The <see cref="ModelSaveContext"/> that facilitates saving to the <see cref="Repository"/>.</param>
392-
public void Save(ModelSaveContext ctx)
392+
private protected override void SaveModel(ModelSaveContext ctx)
393393
{
394394
Host.CheckValue(ctx, nameof(ctx));
395395
ctx.CheckAtModel();

src/Microsoft.ML.StandardLearners/Standard/ModelStatistics.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ internal static LinearModelStatistics Create(IHostEnvironment env, ModelLoadCont
166166
return new LinearModelStatistics(env, ctx);
167167
}
168168

169-
public void Save(ModelSaveContext ctx)
169+
void ICanSaveModel.Save(ModelSaveContext ctx)
170170
{
171171
Contracts.AssertValue(_env);
172172
_env.CheckValue(ctx, nameof(ctx));

src/Microsoft.ML.TensorFlow/TensorflowTransform.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ internal static (TFDataType[] tfOutputTypes, ColumnType[] outputTypes) GetOutput
706706

707707
private protected override IRowMapper MakeRowMapper(Schema inputSchema) => new Mapper(this, inputSchema);
708708

709-
public override void Save(ModelSaveContext ctx)
709+
private protected override void SaveModel(ModelSaveContext ctx)
710710
{
711711
Host.AssertValue(ctx);
712712
ctx.CheckAtModel();
@@ -874,7 +874,7 @@ public Mapper(TensorFlowTransformer parent, Schema inputSchema) :
874874
}
875875
}
876876

877-
public override void Save(ModelSaveContext ctx) => _parent.Save(ctx);
877+
private protected override void SaveModel(ModelSaveContext ctx) => _parent.SaveModel(ctx);
878878

879879
private class OutputCache
880880
{

src/Microsoft.ML.Transforms/RandomFourierFeaturizing.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public TransformInfo(IHostEnvironment env, ModelLoadContext ctx, string director
162162
InitializeFourierCoefficients(roundedUpNumFeatures, roundedUpD);
163163
}
164164

165-
public void Save(ModelSaveContext ctx, string directoryName)
165+
internal void Save(ModelSaveContext ctx, string directoryName)
166166
{
167167
Contracts.AssertValue(ctx);
168168

0 commit comments

Comments
 (0)