conf(offpolicy): default collector inference to the accelerator for sac/flashsac - #950
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SAC 与 FlashSAC 的
training.collector_infer_device默认值从cpu改为gpu,配合 #947 的 GPU collector weight sync,collector 推理默认落在加速器上。gpu是resolve_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.yaml与flashsac.yaml从# @package algo改为# @package _global_(与仓库全部 task owner yaml 同一写法),在training:段声明默认值。cpu默认不变;用户可用training.collector_infer_device=cpu覆盖。Validation
training.collector_infer_device由cpu→gpu,其余字段逐一相同;td3 完全一致。make test-all通过:ruff / mypy / pyright 干净,pytest 1508 passed, 36 skipped, 269 deselected, 1 xfailed。