1 write to Host
Microsoft.ML.TorchSharp (1)
19 references to Host
Microsoft.ML.TorchSharp (19)
Roberta\QATrainer.cs (19)
157using (var ch = Host.Start("TrainModel"))
158using (var pch = Host.StartProgressChannel("Training model"))
173Host.CheckAlive();
174trainer.Train(Host, input, pch);
180transformer = new QATransformer(Host, Option, trainer.Model);
208Device = TorchUtils.InitializeDevice(Parent.Host);
216Device = TorchUtils.InitializeDevice(Parent.Host);
252var destDir = Path.Combine(((IHostEnvironmentInternal)Parent.Host).TempFilePath, "mlnet");
260using (var ch = (Parent.Host as IHostEnvironment).Start("Ensuring model file is present."))
262var ensureModel = ResourceManagerUtils.Instance.EnsureResourceAsync(Parent.Host, ch, ModelUrl, destFileName, destDir, timeout);
511Host.CheckValue(inputSchema, nameof(inputSchema));
539throw Host.ExceptSchemaMismatch(nameof(inputSchema), "Context", Option.ContextColumnName);
541throw Host.ExceptSchemaMismatch(nameof(inputSchema), "Context", Option.ContextColumnName,
545throw Host.ExceptSchemaMismatch(nameof(inputSchema), "Question", Option.QuestionColumnName);
547throw Host.ExceptSchemaMismatch(nameof(inputSchema), "Question", Option.QuestionColumnName,
551throw Host.ExceptSchemaMismatch(nameof(inputSchema), "TrainingAnswer", Option.TrainingAnswerColumnName);
553throw Host.ExceptSchemaMismatch(nameof(inputSchema), "TrainingAnswer", Option.TrainingAnswerColumnName,
557throw Host.ExceptSchemaMismatch(nameof(inputSchema), "AnswerIndex", Option.AnswerIndexStartColumnName);
559throw Host.ExceptSchemaMismatch(nameof(inputSchema), "AnswerIndex", Option.AnswerIndexStartColumnName,