1 write to Host
Microsoft.ML.TorchSharp (1)
19 references to Host
Microsoft.ML.TorchSharp (19)
Roberta\QATrainer.cs (19)
150using (var ch = Host.Start("TrainModel"))
151using (var pch = Host.StartProgressChannel("Training model"))
166Host.CheckAlive();
167trainer.Train(Host, input, pch);
173transformer = new QATransformer(Host, Option, trainer.Model);
201Device = TorchUtils.InitializeDevice(Parent.Host);
209Device = TorchUtils.InitializeDevice(Parent.Host);
245var destDir = Path.Combine(((IHostEnvironmentInternal)Parent.Host).TempFilePath, "mlnet");
253using (var ch = (Parent.Host as IHostEnvironment).Start("Ensuring model file is present."))
255var ensureModel = ResourceManagerUtils.Instance.EnsureResourceAsync(Parent.Host, ch, ModelUrl, destFileName, destDir, timeout);
504Host.CheckValue(inputSchema, nameof(inputSchema));
532throw Host.ExceptSchemaMismatch(nameof(inputSchema), "Context", Option.ContextColumnName);
534throw Host.ExceptSchemaMismatch(nameof(inputSchema), "Context", Option.ContextColumnName,
538throw Host.ExceptSchemaMismatch(nameof(inputSchema), "Question", Option.QuestionColumnName);
540throw Host.ExceptSchemaMismatch(nameof(inputSchema), "Question", Option.QuestionColumnName,
544throw Host.ExceptSchemaMismatch(nameof(inputSchema), "TrainingAnswer", Option.TrainingAnswerColumnName);
546throw Host.ExceptSchemaMismatch(nameof(inputSchema), "TrainingAnswer", Option.TrainingAnswerColumnName,
550throw Host.ExceptSchemaMismatch(nameof(inputSchema), "AnswerIndex", Option.AnswerIndexStartColumnName);
552throw Host.ExceptSchemaMismatch(nameof(inputSchema), "AnswerIndex", Option.AnswerIndexStartColumnName,