Migrating from unilab-rl (uni_rl)¶
This page is for users who installed the uni_rl extra
(pip install unilab[uni_rl]) or imported the uni_rl package directly.
The former unilab-rl distribution (import namespace uni_rl, repository
unilabsim/unilab_rl) is merged into
this repository under unilab.rl (issue #2372, decision in
ADR-0016 RL Reintegration Into unilab.rl And Single Distribution). There is a single
unilab distribution: the APPO / SAC / FlashSAC runners, the async IPC
runtime, and the RL logging stack ship in the base install.
Install changes¶
Drop
--extra uni_rlfromuv synccommands andunilab[uni_rl]from pip installs; the RL stack needs no extra.The empty transitional
uni_rlextra has been removed, so the old commands now fail with an unknown-extra error. Remove the extra from scripts and CI.Remove any standalone
unilab-rlinstall from your environment (pip uninstall unilab-rl) so no stale copy of the old implementation lingers next tounilab.rl.CLI algorithm names, log paths, checkpoint fields, and metric schemas are unchanged.
Import path mapping¶
Old import ( |
New import |
|---|---|
|
|
|
no replacement ( |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
no replacement (the tensor-native collector no longer uses host conversion helpers) |
|
|
|
|
The unilab.rl package-level surface (from unilab.rl import RslRlVecEnvAdapter, UNILAB_DP_LOG_DIR, launch_torchrun_workers, and the
other names in src/unilab/rl/__init__.py) is unchanged and resolved lazily.
Permanent import uni_rl support is not guaranteed; migrate to the
unilab.rl.* paths.
Behavior changes¶
The SAC / FlashSAC runner builders (
build_double_buffer_runnerinunilab.rl.algos.sac.double_bufferandunilab.rl.algos.flash_sac.double_buffer) are injection-based: the training assembly layer passesruntime_settings,inference_placement,backend_device_resolver, andbackend_device_configurer; the oldbackend_device_binderparameter is removed. When omitted, runner-side defaults apply.Extension mechanisms are unchanged:
runtime_resolver,class_name,actor_adapter_modules, and the actor registry keep working, and external dotted paths into your own packages remain valid. Only built-in dotted paths moved to theunilab.rl.*namespace.The boundary “uni_rl must not import UniLab” no longer applies; the RL stack now follows the internal layering rules of
unilab.rl(the RL core does not depend on the env/training layers). See ADR-0016 RL Reintegration Into unilab.rl And Single Distribution for the layer DAG.