HF RL Explorer

Using click 's exception hierarchy, implement a custom exception class called RangedParameterError that…

Using click 's exception hierarchy, implement a custom exception class called RangedParameterError that…: a task in repo2rlenv-code-instruct (Harbor dataset). Implement a function validate range(value, min val, max val, param hint=None) that: - Accepts a numeric value and an inclusive range min…

The task

Implement a function `validate_range(value, min_val, max_val, param_hint=None)` that: - Accepts a numeric `value` and an inclusive range `[min_val, max_val]`. - If `value` is within the range, returns it unchanged. - If `value` is outside the range, raises `RangedParameterError` with a message of the form `"value X…

Part of FineEnvs/repo2rlenv-code-instruct.