HF RL Explorer

BaseModel.construct() does not properly handle nested models, optionals, and lists

BaseModel.construct() does not properly handle nested models, optionals, and lists: a task in LegoFlow-SWE (Harbor dataset). Calling construct() on a model that has fields typed as another model (or Optional Model , List Model , etc.) does not convert nested dictionaries into model instances…

The task

Calling `construct()` on a model that has fields typed as another model (or `Optional[Model]`, `List[Model]`, etc.) does not convert nested dictionaries into model instances. Moreover, in some cases a mismatched type (e.g., a `set` where a `dict` is expected, or `bool` where a `list` is expected) causes errors, even…

Part of Lego-X/LegoFlow-SWE.