public SessionFactoryHolderFactory( ShellSettings shellSettings, ShellBlueprint shellBlueprint, IDataServicesProviderFactory dataServicesProviderFactory, IAppDataFolder appDataFolder, ISessionConfigurationCache sessionConfigurationCache, IHostEnvironment hostEnvironment, IDatabaseCacheConfiguration cacheConfiguration, Func<IEnumerable<ISessionConfigurationEvents>> configurers, IRepository<ConnectionsRecord> connectionsRecordRepository, IEncryptionService encryptionService, ICacheManager cacheManager) { _shellSettings = shellSettings; _shellBlueprint = shellBlueprint; _dataServicesProviderFactory = dataServicesProviderFactory; _appDataFolder = appDataFolder; _sessionConfigurationCache = sessionConfigurationCache; _hostEnvironment = hostEnvironment; _cacheConfiguration = cacheConfiguration; _configurers = configurers; _connectionsRecordRepository = connectionsRecordRepository; _encryptionService = encryptionService; _cacheManager = cacheManager; T = NullLocalizer.Instance; Logger = NullLogger.Instance; }
public ClientLoader(IHostEnvironment hostEnvironment) { _path = //System.IO.Path.Combine(moduleFolder.Path, "QsTech.Authentication.Sso", "client.xml"); System.IO.Path.Combine(hostEnvironment.SitePath,"client.xml"); Logger = NullLogger.Instance; }
public IDataTransform ApplyToData(IHostEnvironment env, IDataView newSource) { return(new TermTransform(env, this, newSource)); }
internal abstract void Save(IHostEnvironment env, Stream stream);
// Factory method for SignatureLoadDataTransform. private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) => Create(env, ctx).MakeDataTransform(input);
private FastTreeTweedieModelParameters(IHostEnvironment env, ModelLoadContext ctx) : base(env, RegistrationName, ctx, GetVersionInfo()) { }
/// <summary> /// </summary> /// <param name="env"></param> public GlobalExceptionsFilter(IHostEnvironment env) { _env = env; }
public MultiMedian(IHostEnvironment env, Options options) : base(env, LoaderSignature, options) { }
/// <summary> /// Initializes a new instance of <see cref="NaiveBayesTrainer"/> /// </summary> internal NaiveBayesTrainer(IHostEnvironment env, Options options) : base(Contracts.CheckRef(env, nameof(env)).Register(LoadName), TrainerUtils.MakeR4VecFeature(options.FeatureColumnName), TrainerUtils.MakeU4ScalarColumn(options.LabelColumnName)) { Host.CheckValue(options, nameof(options)); }
public AppDataFolderRoot(IHostEnvironment hostEnvironment) { _hostEnvironment = hostEnvironment; }
internal static CommonOutputs.MulticlassClassificationOutput TrainMulticlassNaiveBayesTrainer(IHostEnvironment env, Options input) { Contracts.CheckValue(env, nameof(env)); var host = env.Register("TrainMultiClassNaiveBayes"); host.CheckValue(input, nameof(input)); EntryPointUtils.CheckInputArgs(host, input); return(TrainerEntryPointsUtils.Train <Options, CommonOutputs.MulticlassClassificationOutput>(host, input, () => new NaiveBayesTrainer(host, input), () => TrainerEntryPointsUtils.FindColumn(host, input.TrainingData.Schema, input.LabelColumnName))); }
/// <param name="env">The environment.</param> /// <param name="columns">Describes the parameters of the whitening process for each column pair.</param> internal VectorWhiteningEstimator(IHostEnvironment env, params ColumnOptions[] columns) { _host = Contracts.CheckRef(env, nameof(env)).Register(nameof(VectorWhiteningEstimator)); _infos = columns; }
public CoeveryLog4netFactory(IHostEnvironment hostEnvironment) : this(ConfigurationManager.AppSettings["log4net.Config"], hostEnvironment) { }
public MenuController(Context con, IHostEnvironment hostEnvironment) { this.con = con; HostEnvironment = hostEnvironment; }
public DynamicExtensionLoaderAccessor( IBuildManager buildManager, IVirtualPathProvider virtualPathProvider, IVirtualPathMonitor virtualPathMonitor, IHostEnvironment hostEnvironment, IAssemblyProbingFolder assemblyProbingFolder, IDependenciesFolder dependenciesFolder, IProjectFileParser projectFileParser) : base(buildManager, virtualPathProvider, virtualPathMonitor, hostEnvironment, assemblyProbingFolder, dependenciesFolder, projectFileParser) { }
public IMulticlassOutputCombiner CreateComponent(IHostEnvironment env) => new MultiMedian(env, this);
public NotaFiscalRepository(IElasticClient elasticClient, IHostEnvironment env) : base(elasticClient, env) { }
public DefaultVirtualPathProvider(IHostEnvironment hostEnvironment) : base(hostEnvironment) { }
protected BaseSubModelSelector(IHostEnvironment env, string name) { Contracts.CheckValue(env, nameof(env)); env.CheckNonWhiteSpace(name, nameof(name)); Host = env.Register(name); }
internal FastTreeTweedieModelParameters(IHostEnvironment env, InternalTreeEnsemble trainedEnsemble, int featureCount, string innerArgs) : base(env, RegistrationName, trainedEnsemble, featureCount, innerArgs) { }
public MainHostStartup(IConfiguration configuration, IHostEnvironment environment) { _configuration = configuration; _environment = environment; }
public DefaultVirtualPathProvider( IHostEnvironment hostEnvironment) { _hostEnvironment = hostEnvironment; }
/// <summary> /// Initializes a new instance of <see cref="GenerateNumberTransform"/>. /// </summary> /// <param name="env">Host Environment.</param> /// <param name="input">Input <see cref="IDataView"/>. This is the output from previous transform or loader.</param> /// <param name="name">Name of the output column.</param> /// <param name="seed">Seed to start random number generator.</param> /// <param name="useCounter">Use an auto-incremented integer starting at zero instead of a random number.</param> public GenerateNumberTransform(IHostEnvironment env, IDataView input, string name, uint?seed = null, bool useCounter = Defaults.UseCounter) : this(env, new Options() { Columns = new[] { new Column() { Name = name } }, Seed = seed ?? Defaults.Seed, UseCounter = useCounter }, input) { }
protected FolderBase(IHostEnvironment hostEnvironment, IVirtualPathMonitor virtualPathMonitor) : base(hostEnvironment) { _virtualPathMonitor = virtualPathMonitor; }
public ISubsetSelector CreateComponent(IHostEnvironment env) => new BootstrapSelector(env, this);
/// <summary> /// This builds the <see cref="TermMap"/> instances per column. /// </summary> private static TermMap[] Train(IHostEnvironment env, IChannel ch, ColInfo[] infos, ArgumentsBase args, ColumnBase[] column, IDataView trainingData) { Contracts.AssertValue(env); env.AssertValue(ch); ch.AssertValue(infos); ch.AssertValue(args); ch.AssertValue(column); ch.AssertValue(trainingData); if ((args.Term != null || !string.IsNullOrEmpty(args.Terms)) && (!string.IsNullOrWhiteSpace(args.DataFile) || args.Loader != null || !string.IsNullOrWhiteSpace(args.TermsColumn))) { ch.Warning("Explicit term list specified. Data file arguments will be ignored"); } if (!Enum.IsDefined(typeof(SortOrder), args.Sort)) { throw ch.ExceptUserArg(nameof(args.Sort), "Undefined sorting criteria '{0}' detected", args.Sort); } TermMap termsFromFile = null; var termMap = new TermMap[infos.Length]; int[] lims = new int[infos.Length]; int trainsNeeded = 0; HashSet <int> toTrain = null; for (int iinfo = 0; iinfo < infos.Length; iinfo++) { // First check whether we have a terms argument, and handle it appropriately. var terms = new DvText(column[iinfo].Terms); var termsArray = column[iinfo].Term; if (!terms.HasChars && termsArray == null) { terms = new DvText(args.Terms); termsArray = args.Term; } terms = terms.Trim(); if (terms.HasChars || (termsArray != null && termsArray.Length > 0)) { // We have terms! Pass it in. var sortOrder = column[iinfo].Sort ?? args.Sort; if (!Enum.IsDefined(typeof(SortOrder), sortOrder)) { throw ch.ExceptUserArg(nameof(args.Sort), "Undefined sorting criteria '{0}' detected for column '{1}'", sortOrder, infos[iinfo].Name); } var bldr = Builder.Create(infos[iinfo].TypeSrc, sortOrder); if (terms.HasChars) { bldr.ParseAddTermArg(ref terms, ch); } else { bldr.ParseAddTermArg(termsArray, ch); } termMap[iinfo] = bldr.Finish(); } else if (!string.IsNullOrWhiteSpace(args.DataFile)) { // First column using this file. if (termsFromFile == null) { var bldr = Builder.Create(infos[iinfo].TypeSrc, column[iinfo].Sort ?? args.Sort); termsFromFile = CreateFileTermMap(env, ch, args, bldr); } if (!termsFromFile.ItemType.Equals(infos[iinfo].TypeSrc.ItemType)) { // We have no current plans to support re-interpretation based on different column // type, not only because it's unclear what realistic customer use-cases for such // a complicated feature would be, and also because it's difficult to see how we // can logically reconcile "reinterpretation" for different types with the resulting // data view having an actual type. throw ch.ExceptUserArg(nameof(args.DataFile), "Data file terms loaded as type '{0}' but mismatches column '{1}' item type '{2}'", termsFromFile.ItemType, infos[iinfo].Name, infos[iinfo].TypeSrc.ItemType); } termMap[iinfo] = termsFromFile; } else { // Auto train this column. Leave the term map null for now, but set the lim appropriately. lims[iinfo] = column[iinfo].MaxNumTerms ?? args.MaxNumTerms; ch.CheckUserArg(lims[iinfo] > 0, nameof(Column.MaxNumTerms), "Must be positive"); Utils.Add(ref toTrain, infos[iinfo].Source); ++trainsNeeded; } } ch.Assert((Utils.Size(toTrain) == 0) == (trainsNeeded == 0)); ch.Assert(Utils.Size(toTrain) <= trainsNeeded); if (trainsNeeded > 0) { Trainer[] trainer = new Trainer[trainsNeeded]; int[] trainerInfo = new int[trainsNeeded]; // Open the cursor, then instantiate the trainers. int itrainer; using (var cursor = trainingData.GetRowCursor(toTrain.Contains)) using (var pch = env.StartProgressChannel("Building term dictionary")) { long rowCur = 0; double rowCount = trainingData.GetRowCount(true) ?? double.NaN; var header = new ProgressHeader(new[] { "Total Terms" }, new[] { "examples" }); itrainer = 0; for (int iinfo = 0; iinfo < infos.Length; ++iinfo) { if (termMap[iinfo] != null) { continue; } var bldr = Builder.Create(infos[iinfo].TypeSrc, column[iinfo].Sort ?? args.Sort); trainerInfo[itrainer] = iinfo; trainer[itrainer++] = Trainer.Create(cursor, infos[iinfo].Source, false, lims[iinfo], bldr); } ch.Assert(itrainer == trainer.Length); pch.SetHeader(header, e => { e.SetProgress(0, rowCur, rowCount); // Purely feedback for the user. That the other thread might be // working in the background is not a problem. e.SetMetric(0, trainer.Sum(t => t.Count)); }); // The [0,tmin) trainers are finished. int tmin = 0; // We might exit early if all trainers reach their maximum. while (tmin < trainer.Length && cursor.MoveNext()) { rowCur++; for (int t = tmin; t < trainer.Length; ++t) { if (!trainer[t].ProcessRow()) { Utils.Swap(ref trainerInfo[t], ref trainerInfo[tmin]); Utils.Swap(ref trainer[t], ref trainer[tmin++]); } } } pch.Checkpoint(trainer.Sum(t => t.Count), rowCur); } for (itrainer = 0; itrainer < trainer.Length; ++itrainer) { int iinfo = trainerInfo[itrainer]; ch.Assert(termMap[iinfo] == null); if (trainer[itrainer].Count == 0) { ch.Warning("Term map for output column '{0}' contains no entries.", infos[iinfo].Name); } termMap[iinfo] = trainer[itrainer].Finish(); // Allow the intermediate structures in the trainer and builder to be released as we iterate // over the columns, as the Finish operation can potentially result in the allocation of // additional structures. trainer[itrainer] = null; } ch.Assert(termMap.All(tm => tm != null)); ch.Assert(termMap.Zip(infos, (tm, info) => tm.ItemType.Equals(info.TypeSrc.ItemType)).All(x => x)); } return(termMap); }
/// <summary> /// Utility method to create the file-based <see cref="TermMap"/> if the <see cref="ArgumentsBase.DataFile"/> /// argument of <paramref name="args"/> was present. /// </summary> private static TermMap CreateFileTermMap(IHostEnvironment env, IChannel ch, ArgumentsBase args, Builder bldr) { Contracts.AssertValue(ch); ch.AssertValue(env); ch.AssertValue(args); ch.Assert(!string.IsNullOrWhiteSpace(args.DataFile)); ch.AssertValue(bldr); string file = args.DataFile; // First column using the file. string src = args.TermsColumn; IMultiStreamSource fileSource = new MultiFileSource(file); var loaderFactory = args.Loader; // If the user manually specifies a loader, or this is already a pre-processed binary // file, then we assume the user knows what they're doing and do not attempt to convert // to the desired type ourselves. bool autoConvert = false; IDataView termData; if (loaderFactory != null) { termData = loaderFactory.CreateComponent(env, fileSource); } else { // Determine the default loader from the extension. var ext = Path.GetExtension(file); bool isBinary = string.Equals(ext, ".idv", StringComparison.OrdinalIgnoreCase); bool isTranspose = string.Equals(ext, ".tdv", StringComparison.OrdinalIgnoreCase); if (isBinary || isTranspose) { ch.Assert(isBinary != isTranspose); ch.CheckUserArg(!string.IsNullOrWhiteSpace(src), nameof(args.TermsColumn), "Must be specified"); if (isBinary) { termData = new BinaryLoader(env, new BinaryLoader.Arguments(), fileSource); } else { ch.Assert(isTranspose); termData = new TransposeLoader(env, new TransposeLoader.Arguments(), fileSource); } } else { if (!string.IsNullOrWhiteSpace(src)) { ch.Warning( "{0} should not be specified when default loader is TextLoader. Ignoring {0}={1}", nameof(Arguments.TermsColumn), src); } termData = TextLoader.ReadFile(env, new TextLoader.Arguments() { Separator = "tab", Column = new[] { new TextLoader.Column("Term", DataKind.TX, 0) } }, fileSource); src = "Term"; autoConvert = true; } } ch.AssertNonEmpty(src); int colSrc; if (!termData.Schema.TryGetColumnIndex(src, out colSrc)) { throw ch.ExceptUserArg(nameof(args.TermsColumn), "Unknown column '{0}'", src); } var typeSrc = termData.Schema.GetColumnType(colSrc); if (!autoConvert && !typeSrc.Equals(bldr.ItemType)) { throw ch.ExceptUserArg(nameof(args.TermsColumn), "Must be of type '{0}' but was '{1}'", bldr.ItemType, typeSrc); } using (var cursor = termData.GetRowCursor(col => col == colSrc)) using (var pch = env.StartProgressChannel("Building term dictionary from file")) { var header = new ProgressHeader(new[] { "Total Terms" }, new[] { "examples" }); var trainer = Trainer.Create(cursor, colSrc, autoConvert, int.MaxValue, bldr); double rowCount = termData.GetRowCount(true) ?? double.NaN; long rowCur = 0; pch.SetHeader(header, e => { e.SetProgress(0, rowCur, rowCount); // Purely feedback for the user. That the other thread might be // working in the background is not a problem. e.SetMetric(0, trainer.Count); }); while (cursor.MoveNext() && trainer.ProcessRow()) { rowCur++; } if (trainer.Count == 0) { ch.Warning("Term map loaded from file resulted in an empty map."); } pch.Checkpoint(trainer.Count, rowCur); return(trainer.Finish()); } }
public DefaultVirtualPathProvider( IHostEnvironment hostEnvironment, ILogger<DefaultVirtualPathProvider> logger) { _hostEnvironment = hostEnvironment; _logger = logger; }
public DefaultVirtualPathProvider( IHostEnvironment hostEnvironment, ILoggerFactory loggerFactory) { _hostEnvironment = hostEnvironment; _logger = loggerFactory.CreateLogger<DefaultVirtualPathProvider>(); }
public OrchardLog4netFactory(string configFilename, IHostEnvironment hostEnvironment) { if (!_isFileWatched && !string.IsNullOrWhiteSpace(configFilename) && hostEnvironment.IsFullTrust) { // Only monitor configuration file in full trust XmlConfigurator.ConfigureAndWatch(GetConfigFile(configFilename)); _isFileWatched = true; } }
public CustomSessionFactoryHolder( ShellSettings shellSettings, ShellBlueprint shellBlueprint, IDataServicesProviderFactory dataServicesProviderFactory, IAppDataFolder appDataFolder, ISessionConfigurationCache sessionConfigurationCache, IHostEnvironment hostEnvironment, IDatabaseCacheConfiguration cacheConfiguration, Func<IEnumerable<ISessionConfigurationEvents>> configurers, string provider, string connectionString ) { _shellSettings = shellSettings; _shellBlueprint = shellBlueprint; _dataServicesProviderFactory = dataServicesProviderFactory; _appDataFolder = appDataFolder; _sessionConfigurationCache = sessionConfigurationCache; _hostEnvironment = hostEnvironment; _cacheConfiguration = cacheConfiguration; _configurers = configurers; _provider = provider; _connectionString = connectionString; T = NullLocalizer.Instance; Logger = NullLogger.Instance; }
public DynamicExtensionLoader( IOptions<ExtensionHarvestingOptions> optionsAccessor, IHostEnvironment hostEnvironment, IOrchardFileSystem fileSystem) { ExtensionsSearchPaths = optionsAccessor.Value.ModuleLocationExpanders.SelectMany(x => x.SearchPaths).ToArray(); _hostEnvironment = hostEnvironment; _fileSystem = fileSystem; }
public SessionConfigurationCache(ShellSettings shellSettings, ShellBlueprint shellBlueprint, IAppDataFolder appDataFolder, IHostEnvironment hostEnvironment) { _shellSettings = shellSettings; _shellBlueprint = shellBlueprint; _appDataFolder = appDataFolder; _hostEnvironment = hostEnvironment; _currentConfig = null; Logger = NullLogger.Instance; }
public CoreExtensionLoader( IHostEnvironment hostEnvironment, IOrchardFileSystem fileSystem, ILogger<CoreExtensionLoader> logger) { _hostEnvironment = hostEnvironment; _fileSystem = fileSystem; _logger = logger; }
/// <summary> /// 初始化一个新的扩展装载机。 /// </summary> /// <param name="dependenciesFolder">依赖文件夹。</param> /// <param name="assemblyProbingFolder">程序集探测文件夹。</param> /// <param name="applicationFolder">应用程序文件夹。</param> /// <param name="hostEnvironment">主机环境。</param> public PrecompiledExtensionLoader(IDependenciesFolder dependenciesFolder, IHostEnvironment hostEnvironment, IAssemblyProbingFolder assemblyProbingFolder, IApplicationFolder applicationFolder) : base(dependenciesFolder) { _hostEnvironment = hostEnvironment; _assemblyProbingFolder = assemblyProbingFolder; _applicationFolder = applicationFolder; Logger = NullLogger.Instance; }
public PackagingServicesController( ShellSettings shellSettings, IPackageManager packageManager, IPackagingSourceManager packagingSourceManager, IAppDataFolderRoot appDataFolderRoot, IOrchardServices services, IModuleService moduleService, IHostEnvironment hostEnvironment) : this(shellSettings, packageManager, packagingSourceManager, appDataFolderRoot, services, moduleService, hostEnvironment, null, null) { }
public CoreExtensionLoader( IHostEnvironment hostEnvironment, IAssemblyLoaderContainer container, IExtensionAssemblyLoader extensionAssemblyLoader, ILogger<CoreExtensionLoader> logger) { _hostEnvironment = hostEnvironment; _loaderContainer = container; _extensionAssemblyLoader = extensionAssemblyLoader; _logger = logger; }
public DynamicExtensionLoader( IHostEnvironment hostEnvironment, IAssemblyLoaderContainer container, IExtensionAssemblyLoader extensionAssemblyLoader, ILoggerFactory loggerFactory) { _hostEnvironment = hostEnvironment; _loaderContainer = container; _extensionAssemblyLoader = extensionAssemblyLoader; _logger = loggerFactory.CreateLogger<DynamicExtensionLoader>(); }
public PackageUninstallHandler( ShellSettings shellSettings, IShellDescriptorManager shellDescriptorManager, IProcessingEngine processingEngine, IHostEnvironment hostEnvironment, IPackageInstaller packageInstaller) { _shellSettings = shellSettings; _shellDescriptorManager = shellDescriptorManager; _processingEngine = processingEngine; _hostEnvironment = hostEnvironment; _packageInstaller = packageInstaller; }
public CoreExtensionLoader( IHostEnvironment hostEnvironment, IAssemblyLoaderContainer container, IExtensionAssemblyLoader extensionAssemblyLoader, IOrchardFileSystem fileSystem, ILogger<CoreExtensionLoader> logger) { _hostEnvironment = hostEnvironment; _loaderContainer = container; _extensionAssemblyLoader = extensionAssemblyLoader; _fileSystem = fileSystem; _logger = logger; }
public DynamicExtensionLoader( IOptions<ExtensionHarvestingOptions> optionsAccessor, IHostEnvironment hostEnvironment, IAssemblyLoaderContainer container, IExtensionAssemblyLoader extensionAssemblyLoader, ILoggerFactory loggerFactory) { ExtensionsSearchPaths = optionsAccessor.Value.ModuleLocationExpanders.SelectMany(x => x.SearchPaths).ToArray(); _hostEnvironment = hostEnvironment; _loaderContainer = container; _extensionAssemblyLoader = extensionAssemblyLoader; _logger = loggerFactory.CreateLogger<DynamicExtensionLoader>(); }
public DynamicExtensionLoader( IOptions<ExtensionHarvestingOptions> optionsAccessor, IHostEnvironment hostEnvironment, IOrchardFileSystem fileSystem, IExtensionLibraryService extensionLibraryService, ILogger<DynamicExtensionLoader> logger) { ExtensionsSearchPaths = optionsAccessor.Value.ExtensionLocationExpanders.SelectMany(x => x.SearchPaths).ToArray(); _hostEnvironment = hostEnvironment; _fileSystem = fileSystem; _extensionLibraryService = extensionLibraryService; _logger = logger; }
public PrecompiledExtensionLoader( IHostEnvironment hostEnvironment, IDependenciesFolder dependenciesFolder, IAssemblyProbingFolder assemblyProbingFolder, IVirtualPathProvider virtualPathProvider, IVirtualPathMonitor virtualPathMonitor) : base(dependenciesFolder) { _hostEnvironment = hostEnvironment; _assemblyProbingFolder = assemblyProbingFolder; _virtualPathProvider = virtualPathProvider; _virtualPathMonitor = virtualPathMonitor; Logger = NullLogger.Instance; }
public DynamicExtensionLoader( IOptions<ExtensionHarvestingOptions> optionsAccessor, IHostEnvironment hostEnvironment, IAssemblyLoaderContainer container, IExtensionAssemblyLoader extensionAssemblyLoader, IOrchardFileSystem fileSystem, ILogger<DynamicExtensionLoader> logger) { ExtensionsSearchPaths = optionsAccessor.Value.ModuleLocationExpanders.SelectMany(x => x.SearchPaths).ToArray(); _hostEnvironment = hostEnvironment; _loaderContainer = container; _extensionAssemblyLoader = extensionAssemblyLoader; _fileSystem = fileSystem; _logger = logger; }
public SessionFactoryHolder( ShellSettings shellSettings, ShellBlueprint shellBlueprint, IDataServicesProviderFactory dataServicesProviderFactory, IAppDataFolder appDataFolder, ISessionConfigurationCache sessionConfigurationCache, IHostEnvironment hostEnvironment) { _shellSettings = shellSettings; _shellBlueprint = shellBlueprint; _dataServicesProviderFactory = dataServicesProviderFactory; _appDataFolder = appDataFolder; _sessionConfigurationCache = sessionConfigurationCache; _hostEnvironment = hostEnvironment; T = NullLocalizer.Instance; Logger = NullLogger.Instance; }
public DynamicExtensionLoader( IBuildManager buildManager, IVirtualPathProvider virtualPathProvider, IVirtualPathMonitor virtualPathMonitor, IHostEnvironment hostEnvironment, IAssemblyProbingFolder assemblyProbingFolder, IDependenciesFolder dependenciesFolder, IProjectFileParser projectFileParser) : base(dependenciesFolder) { _buildManager = buildManager; _virtualPathProvider = virtualPathProvider; _virtualPathMonitor = virtualPathMonitor; _hostEnvironment = hostEnvironment; _assemblyProbingFolder = assemblyProbingFolder; _projectFileParser = projectFileParser; _dependenciesFolder = dependenciesFolder; Logger = NullLogger.Instance; }
public ExtensionLoaderCoordinator( IDependenciesFolder dependenciesFolder, IExtensionDependenciesManager extensionDependenciesManager, IExtensionManager extensionManager, IVirtualPathProvider virtualPathProvider, IEnumerable<IExtensionLoader> loaders, IHostEnvironment hostEnvironment, IParallelCacheContext parallelCacheContext, IBuildManager buildManager) { _dependenciesFolder = dependenciesFolder; _extensionDependenciesManager = extensionDependenciesManager; _extensionManager = extensionManager; _virtualPathProvider = virtualPathProvider; _loaders = loaders.OrderBy(l => l.Order); _hostEnvironment = hostEnvironment; _parallelCacheContext = parallelCacheContext; _buildManager = buildManager; Logger = NullLogger.Instance; }
public PackagingServicesController( ShellSettings shellSettings, IPackageManager packageManager, IPackagingSourceManager packagingSourceManager, IAppDataFolderRoot appDataFolderRoot, IOrchardServices services, IModuleService moduleService, IHostEnvironment hostEnvironment, IRecipeHarvester recipeHarvester, IRecipeManager recipeManager) { _shellSettings = shellSettings; _packageManager = packageManager; _appDataFolderRoot = appDataFolderRoot; _moduleService = moduleService; _hostEnvironment = hostEnvironment; _recipeHarvester = recipeHarvester; _recipeManager = recipeManager; _packagingSourceManager = packagingSourceManager; Services = services; T = NullLocalizer.Instance; Logger = Logging.NullLogger.Instance; }
/// <summary> /// Public constructor corresponding to SignatureDataTransform. /// </summary> public TermTransform(IHostEnvironment env, Arguments args, IDataView input) : this(args, Contracts.CheckRef(args, nameof(args)).Column, env, input) { }
/// <summary> /// This allows a custom model location to be specified. This is useful is a custom model is specified, /// or if the model is desired to be placed or shipped separately in a different folder from the main application. Note that because Onnx models /// must be in a directory all by themsleves for the OnnxTransformer to work, this method appends a ResNet101Onnx/ResNetPrepOnnx subdirectory /// to the passed in directory to prevent having to make that directory manually each time. /// </summary> public static EstimatorChain <ColumnCopyingTransformer> ResNet101(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string outputColumnName, string inputColumnName, string modelDir) { var modelChain = new EstimatorChain <ColumnCopyingTransformer>(); var inputRename = new ColumnCopyingEstimator(env, new[] { ("OriginalInput", inputColumnName) });
/// <summary> /// Constructor corresponding to <see cref="SignatureDataScorer"/>. /// </summary> private static IDataScorerTransform Create(IHostEnvironment env, Arguments args, IDataView data, ISchemaBoundMapper mapper, RoleMappedSchema trainSchema) { return(new GenericScorer(env, args, data, mapper, trainSchema)); }
/// <summary> /// Returns an estimator chain with the two corresponding models (a preprocessing one and a main one) required for the ResNet pipeline. /// Also includes the renaming ColumnsCopyingTransforms required to be able to use arbitrary input and output column names. /// This assumes both of the models are in the same location as the file containing this method, which they will be if used through the NuGet. /// This should be the default way to use ResNet101 if importing the model from a NuGet. /// </summary> public static EstimatorChain <ColumnCopyingTransformer> ResNet101(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string outputColumnName, string inputColumnName) { return(ResNet101(dnnModelContext, env, outputColumnName, inputColumnName, Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "DnnImageModels"))); }
// Factory method for SignatureLoadRowMapper. private static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, Schema inputSchema) => Create(env, ctx).MakeRowMapper(inputSchema);
public BackupService(IHostEnvironment environment, Lazy <ApplicationDbContext> contex) { _backupsPath = Path.Combine(environment.ContentRootPath, "backups"); _context = contex; }
public ExceptionMiddleware(RequestDelegate next, ILogger <ExceptionMiddleware> logger, IHostEnvironment env) { _env = env; _logger = logger; _next = next; }
/// <summary> /// Initializes a new instance of <see cref="FastTreeTweedieTrainer"/> by using the <see cref="Options"/> class. /// </summary> /// <param name="env">The instance of <see cref="IHostEnvironment"/>.</param> /// <param name="options">Algorithm advanced settings.</param> internal FastTreeTweedieTrainer(IHostEnvironment env, Options options) : base(env, options, TrainerUtils.MakeR4ScalarColumn(options.LabelColumnName)) { Initialize(); }
private MultiMedian(IHostEnvironment env, ModelLoadContext ctx) : base(env, LoaderSignature, ctx) { }
public DefaultAppDataFolder(IHostEnvironment hostEnvironment, IVirtualPathMonitor virtualPathMonitor) : base(hostEnvironment, virtualPathMonitor) { }
public BootstrapSelector(IHostEnvironment env, Arguments args) : base(args, env, LoadName) { }
public CertificateConfigLoader(IHostEnvironment hostEnvironment, ILogger <KestrelServer> logger) { HostEnvironment = hostEnvironment; Logger = logger; }