4 writes to _modelFileNameWithPath
Microsoft.ML.Transforms (4)
Text\WordEmbeddingsExtractor.cs (4)
190
_modelFileNameWithPath
= EnsureModelFile(env, out _linesToSkip, (WordEmbeddingEstimator.PretrainedModelKind)_modelKind);
208
_modelFileNameWithPath
= customModelFile;
255
_modelFileNameWithPath
= ctx.LoadNonEmptyString();
261
_modelFileNameWithPath
= EnsureModelFile(Host, out _linesToSkip, (WordEmbeddingEstimator.PretrainedModelKind)_modelKind);
16 references to _modelFileNameWithPath
Microsoft.ML.Transforms (16)
Text\WordEmbeddingsExtractor.cs (16)
264
Host.CheckNonWhiteSpace(
_modelFileNameWithPath
, nameof(
_modelFileNameWithPath
));
294
ctx.SaveString(
_modelFileNameWithPath
);
653
if (!File.Exists(
_modelFileNameWithPath
))
654
throw Host.Except("Custom word embedding model file '{0}' could not be found for Word Embeddings transform.",
_modelFileNameWithPath
);
656
if (_vocab.ContainsKey(
_modelFileNameWithPath
) && _vocab[
_modelFileNameWithPath
] != null)
658
if (_vocab[
_modelFileNameWithPath
].TryGetTarget(out Model model))
667
if (_vocab.ContainsKey(
_modelFileNameWithPath
) && _vocab[
_modelFileNameWithPath
] != null)
669
if (_vocab[
_modelFileNameWithPath
].TryGetTarget(out Model modelObject))
682
Parallel.ForEach(File.ReadLines(
_modelFileNameWithPath
).Skip(skippedLinesCount), GetParallelOptions(hostEnvironment),
690
ch.Warning($"Parsing error while reading model file: '{
_modelFileNameWithPath
}', line number {lineNumber + skippedLinesCount}");
700
ch.Warning($"Dimension mismatch while reading model file: '{
_modelFileNameWithPath
}', line number {parsedLine.lineNumber}, expected dimension = {model.Dimension}, received dimension = {dimension}");
706
var firstLine = File.ReadLines(
_modelFileNameWithPath
).First();
720
_vocab[
_modelFileNameWithPath
] = new WeakReference<Model>(model, false);