Product profiles and runtime requirement checks.
Stable profiles are user-facing aliases over benchmarked implementation
profiles. Experimental aliases and existing implementation profiles remain
available for explicit evaluation use. Only stable aliases and public return
shapes follow the 0.1.x policy in docs/public-api-stability.md.
Summary
Functions
Returns whether a product profile is ready without running inference.
Returns the stability classification for a known profile.
Returns report-safe profile metadata.
Lists opt-in product aliases outside the compatibility promise.
Returns a stable or explicitly experimental product profile descriptor.
Lists all implementation profiles accepted for backward compatibility.
Lists stable user-facing profile names.
Returns the requested profile and resolved implementation profile.
Returns a report-safe readiness result without analyzing PII.
Explicitly prepares reusable resources for a product profile.
Returns the runtime requirements for a product profile.
Resolves a product alias or known implementation profile.
Validates dependencies and reusable runtime assets without running inference.
Types
@type experimental_name() :: :hybrid_gliner_urchade | :openmed_pii
@type name() :: stable_name() | experimental_name()
@type stability() :: :stable | :advanced | :experimental | :historical | :deprecated
@type stable_name() :: :fast | :balanced | :accurate
@type t() :: %Obscura.Profile{ automatic_download: boolean(), backend_policy: atom(), benchmark_ids: [String.t()], category: atom(), default_models: [atom()], implementation_profile: atom(), name: name(), optional_dependencies: [atom()], recognizer_mode: atom(), required_assets: [atom()], required_dependencies: [atom()], stability: stability(), supported_entities: [atom()] }
Functions
Returns whether a product profile is ready without running inference.
@spec classification(atom() | String.t()) :: {:ok, stability()} | {:error, Obscura.Diagnostic.t()}
Returns the stability classification for a known profile.
@spec describe(name() | String.t()) :: {:ok, map()} | {:error, Obscura.Diagnostic.t()}
Returns report-safe profile metadata.
@spec experimental_names() :: [experimental_name()]
Lists opt-in product aliases outside the compatibility promise.
Experimental aliases remain callable for controlled evaluation, but they are not generally recommended and may change or be removed before release.
@spec fetch(name() | String.t()) :: {:ok, t()} | {:error, Obscura.Diagnostic.t()}
Returns a stable or explicitly experimental product profile descriptor.
@spec implementation_profiles() :: [atom()]
Lists all implementation profiles accepted for backward compatibility.
@spec names() :: [stable_name()]
Lists stable user-facing profile names.
@spec normalize(atom() | String.t()) :: {:ok, %{requested: atom(), implementation: atom()}} | {:error, Obscura.Diagnostic.t()}
Returns the requested profile and resolved implementation profile.
@spec preflight( name() | String.t(), keyword() ) :: {:ok, map()} | {:error, Obscura.Diagnostic.t(), map()}
Returns a report-safe readiness result without analyzing PII.
Local checks are the default. prepare: true explicitly permits runtime and
model preparation.
@spec prepare( name() | String.t(), keyword() ) :: {:ok, Obscura.Profile.Runtime.t()} | {:error, Obscura.Diagnostic.t()}
Explicitly prepares reusable resources for a product profile.
This is the only product-profile API which may load model assets. Ordinary
analysis never calls it implicitly. Remote downloads require
allow_download: true; preparation is cache-only by default and
offline: true always forbids network access.
Model-backed preparation runs in a monitored worker with a 30-minute overall
timeout and a five-minute inactivity timeout by default. Set timeout or
inactivity_timeout to a positive millisecond value or :infinity.
progress: fn event -> ... end receives safe lifecycle events; callback
failures are isolated from preparation. Online preparation retries one
transient model or tokenizer load failure. Offline preparation never retries
asset access. Authorized recovery quarantines unreferenced partial files and
reports cache recovery before replacement download progress.
@spec requirements(name() | String.t()) :: {:ok, map()} | {:error, Obscura.Diagnostic.t()}
Returns the runtime requirements for a product profile.
@spec resolve(atom() | String.t()) :: {:ok, atom()} | {:error, Obscura.Diagnostic.t()}
Resolves a product alias or known implementation profile.
@spec validate_runtime( name() | String.t(), keyword() ) :: :ok | {:error, Obscura.Diagnostic.t()}
Validates dependencies and reusable runtime assets without running inference.