Skip to content

conf(offpolicy): default collector inference to the accelerator for sac/flashsac - #950

Merged
TATP-233 merged 1 commit into
mainfrom
feat/offpolicy-gpu-collector-default
Aug 10, 2026
Merged

conf(offpolicy): default collector inference to the accelerator for sac/flashsac#950
TATP-233 merged 1 commit into
mainfrom
feat/offpolicy-gpu-collector-default

Conversation

@TATP-233

Copy link
Copy Markdown
Collaborator

Summary

SAC 与 FlashSAC 的 training.collector_infer_device 默认值从 cpu 改为 gpu,配合 #947 的 GPU collector weight sync,collector 推理默认落在加速器上。

  • gpuresolve_torch_device_alias 已有的跨平台别名:ROCm/AMD 上 torch.cuda.is_available() 为 True → 解析为 cuda;macOS → mps;无加速器时 fail fast(off-policy 本就要求 CUDA/MPS learner device,行为一致)。
  • 实现方式:conf/offpolicy/algo/sac.yamlflashsac.yaml# @package algo 改为 # @package _global_(与仓库全部 task owner yaml 同一写法),在 training: 段声明默认值。
  • TD3 保持 cpu 默认不变;用户可用 training.collector_infer_device=cpu 覆盖。

Validation

  • Hydra compose 前后对比:sac / flashsac 仅 training.collector_infer_devicecpugpu,其余字段逐一相同;td3 完全一致。
  • make test-all 通过:ruff / mypy / pyright 干净,pytest 1508 passed, 36 skipped, 269 deselected, 1 xfailed。

…ac/flashsac

Set training.collector_infer_device: gpu in the sac and flashsac algo
owner configs (repackaged to @Package _global_, matching the task-owner
yaml idiom). The gpu alias resolves via resolve_torch_device_alias to
cuda (including ROCm/AMD), then xpu, then mps on macOS, and fails fast
when no accelerator is available — consistent with the off-policy
requirement of a CUDA or MPS learner device. td3 keeps the cpu default.
Composed configs verified identical before/after except this key.
@TATP-233
TATP-233 merged commit 67951ca into main Aug 10, 2026
7 checks passed
@TATP-233
TATP-233 deleted the feat/offpolicy-gpu-collector-default branch August 10, 2026 10:04
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