< Summary

Information
Class: InferenceEngine.Core.OutOfProcessEngineOptions
Assembly: InferenceEngine.Core
File(s): /home/runner/work/inference-engine-lib/inference-engine-lib/InferenceEngine.Core/OutOfProcessEngineOptions.cs
Line coverage
100%
Covered lines: 7
Uncovered lines: 0
Coverable lines: 7
Total lines: 38
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_WorkerExecutablePath()100%11100%
get_WorkerArguments()100%11100%
get_EngineId()100%11100%
get_WorkerEnvironment()100%11100%
get_EngineOptions()100%11100%
get_StartupTimeout()100%11100%
get_InferenceTimeout()100%11100%

File(s)

/home/runner/work/inference-engine-lib/inference-engine-lib/InferenceEngine.Core/OutOfProcessEngineOptions.cs

#LineLine coverage
 1using System;
 2using System.Collections.Generic;
 3
 4namespace InferenceEngine.Core;
 5
 6/// <summary>Options for an <see cref="OutOfProcessBaseInferenceEngine{TInput,TOutput}"/>.</summary>
 7public sealed class OutOfProcessEngineOptions
 8{
 9    /// <summary>Absolute path to the consumer's worker executable (the same app, launched with
 10    /// <see cref="WorkerArguments"/> so it enters <see cref="Worker.InferenceWorkerHost"/>).</summary>
 3711    public required string WorkerExecutablePath { get; init; }
 12
 13    /// <summary>Arguments appended after <see cref="WorkerExecutablePath"/> to enter the worker mode.
 14    /// Default is <c>["--worker", "inference"]</c>; match the consumer's <c>Program.cs</c> entry point.
 15    /// A list (not a single string) avoids fragility with arguments containing spaces.</summary>
 5916    public IReadOnlyList<string> WorkerArguments { get; init; } = new[] { "--worker", "inference" };
 17
 18    /// <summary>Consumer-defined id identifying which engine the worker should construct.</summary>
 14919    public string EngineId { get; init; } = string.Empty;
 20
 21    /// <summary>Environment variables applied to the WORKER process only (e.g.
 22    /// <c>HSA_OVERRIDE_GFX_VERSION=10.3.0</c>). Never applied to the host (which must stay GL-free
 23    /// of ROCm/comgr). Inherits the host's environment by default; these augment/override it.</summary>
 4124    public IReadOnlyDictionary<string, string> WorkerEnvironment { get; init; } = new Dictionary<string, string>();
 25
 26    /// <summary>In-process engine options mirrored to the worker (model path, GPU toggle, warmup).
 27    /// <see cref="InferenceEngineOptions.OnSessionInitialized"/> does not cross the boundary; the
 28    /// proxy mirrors <see cref="BaseInferenceEngine{TInput,TOutput}.EngineInfo"/> from the worker's
 29    /// Load response and fires the callback on the host via <see cref="BaseInferenceEngine{TInput,TOutput}"/>.</summary
 10330    public InferenceEngineOptions EngineOptions { get; init; } = new();
 31
 32    /// <summary>Timeout for the worker to start, handle <c>load</c>, and emit its EngineInfo.
 33    /// The first MIGraphX program compile can take ~85s; default is generous.</summary>
 10834    public TimeSpan StartupTimeout { get; init; } = TimeSpan.FromMinutes(3);
 35
 36    /// <summary>Timeout for a single <c>predict</c> round-trip.</summary>
 6737    public TimeSpan InferenceTimeout { get; init; } = TimeSpan.FromSeconds(60);
 38}