Checklist
Detailed Information
Describe the bug
FSDP initialization fails with TypeError: 'set' object is not subscriptable.
The failure happens when the transformer layer wrap names are represented as a
set, but the FSDP initialization path assumes the value is indexable.
Expected behavior
FSDP initialization should handle common container types for transformer wrap
names, including set, instead of failing on a type mismatch.
Full logs
Relevant excerpt from the real log:
(AReaL) 20260415-06:21:44.507 EngineBP ERROR: Engine method 'initialize' failed: 'set' object is not subscriptable
Traceback (most recent call last):
File "areal/infra/rpc/guard/engine_blueprint.py", line 537, in execute_in_engine_thread
result = method(*args_bcast, **kwargs_bcast)
File "areal/engine/fsdp_engine.py", line 340, in initialize
parallelize_model(
File "areal/engine/fsdp_utils/parallel.py", line 396, in parallelize_model
apply_fsdp2(model, fsdp_kwargs, wrap_policy)
File "areal/engine/fsdp_utils/__init__.py", line 80, in apply_fsdp2
and fsdp_transformer_layer_cls_to_wrap[0] is not None
TypeError: 'set' object is not subscriptable
Checklist
cause, not a secondary error caused by peer workers.
Detailed Information
Describe the bug
FSDP initialization fails with
TypeError: 'set' object is not subscriptable.The failure happens when the transformer layer wrap names are represented as a
set, but the FSDP initialization path assumes the value is indexable.Expected behavior
FSDP initialization should handle common container types for transformer wrap
names, including
set, instead of failing on a type mismatch.Full logs
Relevant excerpt from the real log: