unilab.tasks.compatibility.adapt_legacy_factory

unilab.tasks.compatibility.adapt_legacy_factory(factory, *, task_family, reason)[source]

Mark and wrap an existing EnvCfg -> NpEnv task factory.

The wrapper runs only while the registry constructs an environment. It forwards the registry’s fixed arguments exactly once and rejects any other config or runtime shape instead of probing or falling back.

Parameters:
Return type:

LegacyFactoryAdapter[TypeVar(TCfg_contra, bound= EnvCfg, contravariant=True)]