fix assertion for single world use case (uni) (#29429)

Signed-off-by: Lu Fang <fanglu@fb.com>
Co-authored-by: Lucia (Lu) Fang <fanglu@meta.com>
This commit is contained in:
Lucia Fang 2025-11-25 16:14:23 -08:00 committed by GitHub
parent de75b0bb70
commit d8819c88eb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -593,9 +593,10 @@ class ParallelConfig:
"max_parallel_loading_workers is currently "
"not supported and will be ignored."
)
if self.distributed_executor_backend != "mp" and self.nnodes > 1:
if self.distributed_executor_backend not in ("mp", "uni") and self.nnodes > 1:
raise ValueError(
"nnodes > 1 can only be set when distributed exectuor backend is mp."
"nnodes > 1 can only be set when distributed executor "
"backend is mp or uni."
)
@property