1 write to _env
Microsoft.ML.Data (1)
Model\ModelOperationsCatalog.cs (1)
28_env = env;
39 references to _env
Microsoft.ML.Data (39)
Model\ModelOperationsCatalog.cs (39)
22IHostEnvironment IInternalCatalog.Environment => _env; 41_env.CheckValue(loader, nameof(loader)); 42_env.CheckValueOrNull(model); 43_env.CheckValue(stream, nameof(stream)); 50using (var rep = RepositoryWriter.CreateNew(stream, _env)) 67_env.CheckValueOrNull(model); 68_env.CheckValue(loader, nameof(loader)); 69_env.CheckNonEmpty(filePath, nameof(filePath)); 85_env.CheckValueOrNull(model); 86_env.CheckValueOrNull(inputSchema); 87_env.CheckValue(stream, nameof(stream)); 89using (var rep = RepositoryWriter.CreateNew(stream, _env)) 114_env.CheckValueOrNull(model); 115_env.CheckValueOrNull(inputSchema); 116_env.CheckNonEmpty(filePath, nameof(filePath)); 124_env.AssertValueOrNull(inputSchema); 125_env.AssertValue(rep); 130using (var ch = _env.Start("Saving Schema")) 133var saver = new BinarySaver(_env, new BinarySaver.Arguments { Silent = true }); 134DataSaverUtils.SaveDataView(ch, saver, new EmptyDataView(_env, inputSchema), entry.Stream, keepHidden: true); 154_env.CheckValue(stream, nameof(stream)); 156using (var rep = RepositoryReader.Open(stream, _env)) 161var loader = new BinaryLoader(_env, new BinaryLoader.Arguments(), entry.Stream); 163ModelLoadContext.LoadModel<ITransformer, SignatureLoadModel>(_env, out var transformerChain, rep, 168ModelLoadContext.LoadModelOrNull<IDataLoader<IMultiStreamSource>, SignatureLoadModel>(_env, out var dataLoader, rep, null); 172if (ModelLoadContext.LoadModelOrNull<ITransformer, SignatureLoadModel>(_env, out var transformerChain, rep, 182var loader = ModelFileUtils.LoadLoader(_env, rep, new MultiFileSource(null), false); 184return TransformerChain.LoadFromLegacy(_env, stream); 188throw _env.Except(ex, "Could not load legacy format model"); 213_env.CheckNonEmpty(filePath, nameof(filePath)); 226_env.AssertValue(loader); 260_env.CheckValue(stream, nameof(stream)); 266ModelLoadContext.LoadModel<IDataLoader<IMultiStreamSource>, SignatureLoadModel>(_env, out loader, rep, null); 271throw _env.Except(ex, "Model does not contain an " + nameof(IDataLoader<IMultiStreamSource>) + 288_env.CheckNonEmpty(filePath, nameof(filePath)); 317return transformer.CreatePredictionEngine<TSrc, TDst>(_env, ignoreMissingColumns, inputSchemaDefinition, outputSchemaDefinition); 333return transformer.CreatePredictionEngine<TSrc, TDst>(_env, false, 334DataViewConstructionUtils.GetSchemaDefinition<TSrc>(_env, inputSchema)); 350return transformer.CreatePredictionEngine<TSrc, TDst>(_env, options.IgnoreMissingColumns,