Skip to content

refactor: rename residual DiffRL identifiers to UniRL - #498

Merged
CjhHa1 merged 7 commits into
Tencent-Hunyuan:mainfrom
CjhHa1:rename/diffrl-to-unirl
Sep 30, 2026
Merged

CjhHa1 merged 7 commits into
Tencent-Hunyuan:mainfrom
CjhHa1:rename/diffrl-to-unirl

Conversation

@CjhHa1

@CjhHa1 CjhHa1 commented Sep 21, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Breaking rename of leftover DiffRL identifiers onto UniRL: DIFFRL_* env vars, socket/lock/shm paths, LoRA constants, worker RPC names, mixin helpers, and patch sentinels now use UNIRL_* / _unirl_*.
  • No old-name fallback. DIFFRL_DISABLE_CUDNN is removed; only the existing UNIRL_DISABLE_CUDNN remains. LoRA adapter id stays 1, serialize defaults stay on, replica rank still defaults to 0.
  • Cleanup in the touched weight-sync code: drops the unused _unirl_describe_params / _unirl_param_checksums worker RPCs, redundant int() around the int LoRA id constant and the checksum adapter_id, the unreachable str(adapter_name) or UNIRL_LORA_NAME fallback, the NCCL mixin's load_weights fallback (every extension also mixes in BucketedIPCReceiveMixin), a pointless import alias, inlines the single-use parameter-module lookup into _unirl_loaded_param_checksums, and registers the vLLM-Omni LoRA under UNIRL_LORA_NAME (matching the generation request) so the backend no longer takes adapter_name.

Related Issue

N/A. Follows #413 (merged); this branch is rebased onto current main (fbbf829). The rebase conflict was in patches/runtime.py: #474 deleted patch_per_request_ar_seed, so the rename inside it was dropped.

Test Plan

  • rg -n -i 'diffrl|diff_rl|diff-rl' is empty on the rebased tree
  • Every renamed worker RPC name matches its collective_rpc / _call_rpc call site
  • python3 -m compileall on the changed files
  • SKIP=no-commit-to-branch pre-commit run --from-ref <base> --to-ref HEAD passes
  • NCCL receive path with a stubbed dist.broadcast loads through _unirl_load_weights
  • _unirl_loaded_param_checksums and _unirl_loaded_lora_checksums on stub workers, run against the pre-PR implementation (git show <base>:...) on the same inputs: identical results for direct / empty-wrapper / no-module workers, names hit / miss, top-level and model_runner LoRA managers, and an unknown adapter id
  • Not run: GPU rollout smoke; reason: pure rename plus removal of unreachable/unused code, no behavior change on live paths

Compatibility / Risk

  • Breaking for launch scripts: any DIFFRL_* export (DIFFRL_IPC_DIR, DIFFRL_REPLICA_RANK, DIFFRL_MODEL_LOAD_SERIALIZE, DIFFRL_OMNI_BOOT_SERIALIZE, DIFFRL_DISABLE_CUDNN) must switch to the UNIRL_* name; old names are silently ignored.
  • Socket, lock, and shm names change (unirl-zmq-*.sock, /tmp/unirl_*.lock, unirl_weights_*); trainer and rollout must run the same revision.

Reviewer Notes

The first commit is the mechanical rename; the follow-up commits are the cleanup and can be reviewed separately.

Pre-push review (independent reviewer: GPT-5.6 Sol, no findings):

  • Fixed: int(adapter_id) was applied three times along the LoRA-checksum path (WeightSync, backend, worker RPC); every caller passes the int UNIRL_LORA_INT_ID.
  • Kept: adapter_name on WeightSync.set_lora_from_tensors* (it is the RolloutEngine interface, also used by SGLang, and names the adapter in the wake-reload log/error); getattr(..., "_unirl_*", False) idempotency sentinels on monkey-patched callables.

Checklist

  • I reviewed the changed code and removed unrelated/generated artifacts.
  • I updated tests, docs, and configs where needed, or explained why not.

@github-actions github-actions Bot added the need review Ready and waiting for review label Sep 21, 2026
@CjhHa1
CjhHa1 force-pushed the rename/diffrl-to-unirl branch 2 times, most recently from d258a53 to 87b7ab5 Compare September 24, 2026 09:15
Old DIFFRL_* environment variables and socket/lock/shm paths are no longer recognized.
Remove the unused _unirl_param_checksums worker RPC, redundant int() on the int LoRA id constant, the unreachable adapter-name fallback, the NCCL mixin's load_weights fallback (every extension also mixes in BucketedIPCReceiveMixin), and a pointless import alias.
Generation requests already use UNIRL_LORA_NAME; vLLM and vllm-omni key adapters by lora_int_id, so this only aligns the registered name. The backend no longer takes adapter_name.
Every caller passes the int UNIRL_LORA_INT_ID; the id was coerced again in WeightSync, the backend, and the worker RPC.
@CjhHa1
CjhHa1 force-pushed the rename/diffrl-to-unirl branch from ef4f4be to fff0d9b Compare September 30, 2026 09:00
@CjhHa1
CjhHa1 merged commit 9e14d00 into Tencent-Hunyuan:main Sep 30, 2026
7 checks passed
@github-actions github-actions Bot removed the need review Ready and waiting for review label Sep 30, 2026
@celve celve mentioned this pull request Oct 5, 2026
2 tasks done
@CjhHa1
CjhHa1 deleted the rename/diffrl-to-unirl branch October 8, 2026 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant