HF RL Explorer

I want a Python helper calculate formula(formula="", parameters={}, imports=None) in the calculation…

I want a Python helper calculate formula(formula="", parameters={}, imports=None) in the calculation…: a task in MiMo-V2.6-Code: MiMo-V2.6-RL Code (Harbor) (Harbor dataset). The helper should also support dotted placeholder names and string values supplied by the caller, for example calculate…

The task

The helper should also support dotted placeholder names and string values supplied by the caller, for example `calculate_formula("[Comment] if [Comment] == 'uncertain' else ([Ca] + [Mg])", {"Comment": "'uncertain'", "Ca": 5, "Mg": 5})` returns `'uncertain'`. When `imports` is a list like `[{"module": "math",…

Part of openmodelai/MiMo-V2.6-Code.