2 implementations of IHostEnvironmentInternal
Microsoft.ML.Core (1)
Environment\HostEnvironmentBase.cs (1)
96internal abstract class HostEnvironmentBase<TEnv> : ChannelProviderBase, IHostEnvironmentInternal, IChannelProvider, ICancelable
Microsoft.ML.Data (1)
MLContext.cs (1)
21public sealed class MLContext : IHostEnvironmentInternal
36 references to IHostEnvironmentInternal
Microsoft.ML.AutoML (3)
AutoMLExperiment\AutoMLExperiment.cs (1)
47_settings.Seed = ((IHostEnvironmentInternal)_context.Model.GetEnvironment()).Seed;
AutoMLExperiment\IMLContextManager.cs (1)
36var seed = ((IHostEnvironmentInternal)_mainContext.Model.GetEnvironment()).Seed;
Experiment\Experiment.cs (1)
143int? mainContextSeed = ((IHostEnvironmentInternal)_context.Model.GetEnvironment()).Seed;
Microsoft.ML.AutoML.Tests (1)
MLContextManagerTests.cs (1)
40((IHostEnvironmentInternal)childContext.Model.GetEnvironment()).Seed.Should().Be(10);
Microsoft.ML.Core (4)
Data\Repository.cs (1)
123string tempPath = ectx is IHostEnvironmentInternal iHostInternal ?
Environment\HostEnvironmentBase.cs (3)
426((IHostEnvironmentInternal)host).TempFilePath = TempFilePath; 427((IHostEnvironmentInternal)host).GpuDeviceId = GpuDeviceId; 428((IHostEnvironmentInternal)host).FallbackToCpu = FallbackToCpu;
Microsoft.ML.Data (4)
Commands\TrainTestCommand.cs (1)
191var tempFilePath = hasOutfile ? null : Path.Combine(((IHostEnvironmentInternal)Host).TempFilePath, Path.GetRandomFileName());
DataLoadSave\DataOperationsCatalog.cs (2)
537IHostEnvironmentInternal seededEnv = (IHostEnvironmentInternal)env;
MLContext.cs (1)
178int? IHostEnvironmentInternal.Seed => _env.Seed;
Microsoft.ML.OnnxTransformer (8)
OnnxCatalog.cs (1)
502if (gpuDeviceId == null && env is Runtime.IHostEnvironmentInternal localEnvironment && localEnvironment.GpuDeviceId != null)
OnnxSessionOptions.cs (2)
21if (env is IHostEnvironmentInternal localEnvironment) 31if (env is IHostEnvironmentInternal localEnvironment)
OnnxTransform.cs (2)
221IHostEnvironmentInternal localEnvironment = env as IHostEnvironmentInternal;
OnnxUtils.cs (3)
181if (env is IHostEnvironmentInternal localEnvironment) 408var tempModelFile = Path.Combine(((IHostEnvironmentInternal)env).TempFilePath, Path.GetRandomFileName()); 433var tempModelFile = Path.Combine(((IHostEnvironmentInternal)env).TempFilePath, Path.GetRandomFileName());
Microsoft.ML.TensorFlow (2)
TensorflowTransform.cs (1)
154var tempDirPath = Path.GetFullPath(Path.Combine(((IHostEnvironmentInternal)env).TempFilePath, nameof(TensorFlowTransformer) + "_" + Guid.NewGuid()));
TensorflowUtils.cs (1)
642string tempDirectory = Path.Combine(((IHostEnvironmentInternal)env).TempFilePath, Path.GetRandomFileName());
Microsoft.ML.TorchSharp (12)
AutoFormerV2\ObjectDetectionTrainer.cs (3)
261var destDir = Path.Combine(((IHostEnvironmentInternal)Parent.Host).TempFilePath, "mlnet"); 300if (host is IHostEnvironmentInternal hostInternal) 739if (Host is IHostEnvironmentInternal hostInternal)
Roberta\QATrainer.cs (3)
245var destDir = Path.Combine(((IHostEnvironmentInternal)Parent.Host).TempFilePath, "mlnet"); 288if (host is IHostEnvironmentInternal hostInternal) 723if (Host is IHostEnvironmentInternal hostInternal)
TorchSharpBaseTrainer.cs (3)
171var destDir = Path.Combine(((IHostEnvironmentInternal)Parent.Host).TempFilePath, "mlnet"); 281if (host is IHostEnvironmentInternal hostInternal) 462if (Host is IHostEnvironmentInternal hostInternal)
Utils\TorchUtils.cs (3)
39var device = ((IHostEnvironmentInternal)env).GpuDeviceId != null && cuda.is_available() ? CUDA : CPU; 40if (((IHostEnvironmentInternal)env).FallbackToCpu == false && device == CPU && ((IHostEnvironmentInternal)env).GpuDeviceId != null)
Microsoft.ML.Vision (2)
DnnRetrainTransform.cs (1)
118var tempDirPath = Path.GetFullPath(Path.Combine(((IHostEnvironmentInternal)env).TempFilePath, nameof(DnnRetrainTransformer) + "_" + Guid.NewGuid()));
ImageClassificationTrainer.cs (1)
537_resourcePath = Path.Combine(((IHostEnvironmentInternal)env).TempFilePath, "MLNET");