1 write to _host
Microsoft.ML.EntryPoints (1)
JsonUtils\ExecuteGraphCommand.cs (1)
42
_host
= env.Register(LoadName, args.Seed);
28 references to _host
Microsoft.ML.EntryPoints (28)
JsonUtils\ExecuteGraphCommand.cs (28)
43
_host
.CheckValue(args, nameof(args));
45
_host
.CheckUserArg(args.GraphPath != null && File.Exists(args.GraphPath), nameof(args.GraphPath), "Graph path does not exist");
58
throw
_host
.Except(ex, "Failed to parse experiment graph: {0}", ex.Message);
61
var runner = new GraphRunner(
_host
, graph[FieldNames.Nodes] as JArray);
66
throw
_host
.Except("Unexpected value for '{0}': {1}", FieldNames.Inputs, graph[FieldNames.Inputs]);
73
throw
_host
.Except("Invalid value for input: {0}", kvp.Value);
91
throw
_host
.Except("Invalid value for output: {0}", kvp.Value);
102
_host
.CheckUserArg(runner != null, nameof(runner), "Provide a GraphRunner instance.");
103
_host
.CheckUserArg(!string.IsNullOrWhiteSpace(varName), nameof(varName), "Specify a graph variable name.");
104
_host
.CheckUserArg(!string.IsNullOrWhiteSpace(path), nameof(path), "Specify a valid file path.");
109
var fh = new SimpleFileHandle(
_host
, path, false, false);
113
IDataView loader = new BinaryLoader(
_host
, new BinaryLoader.Arguments(), path);
119
pm = new PredictorModelImpl(
_host
, fs);
125
tm = new TransformModelImpl(
_host
, fs);
129
throw
_host
.Except("Port type {0} not supported", kind);
135
_host
.CheckUserArg(runner != null, nameof(runner), "Provide a GraphRunner instance.");
136
_host
.CheckUserArg(!string.IsNullOrWhiteSpace(varName), nameof(varName), "Specify a graph variable name.");
137
_host
.CheckUserArg(!string.IsNullOrWhiteSpace(path), nameof(path), "Specify a valid file path.");
144
throw
_host
.ExceptNotSupp("File handle outputs not yet supported.");
150
using (var ch =
_host
.Start("Get outputs from executed graph"))
163
using (var handle =
_host
.CreateOutputFile(path))
165
tm.Save(
_host
, fs);
185
throw
_host
.Except("Port type {0} not supported", kind);
215
using (var handle =
_host
.CreateOutputFile(path))
217
pm.Save(
_host
, fs);
230
saver = new BinarySaver(
_host
, new BinarySaver.Arguments());
239
saver = new TextSaver(
_host
, saverArgs);
241
using (var handle =
_host
.CreateOutputFile(path))