HF RL Explorer

Bug: set adapter() raises ValueError after loading multiple adapters when modules to save is involved

Bug: set adapter() raises ValueError after loading multiple adapters when modules to save is involved: a task in LegoFlow-SWE (Harbor dataset). When using task‑specific PEFT model classes (e.g. PeftModelForSequenceClassification , PeftModelForTokenClassification , PeftModelForQuestionAnswering )…

The task

When using task‑specific PEFT model classes (e.g. `PeftModelForSequenceClassification`, `PeftModelForTokenClassification`, `PeftModelForQuestionAnswering`) that automatically add output heads (such as a classifier `linear` layer) to `modules_to_save`, switching between adapters with `set_adapter()` can fail with a…

Part of Lego-X/LegoFlow-SWE.