`suggest_*` methods in OptunaSearch don't support keyword argument passing

1. Severity of the issue: (select one)
Low: Annoying but doesn’t hinder my work.

2. Environment:

  • Ray version: 2.40.0
  • Python version: 3.11.9
  • OS: CentOS 8
  • Cloud/Infrastructure: Docker

3. What happened vs. what you expected:

  • Expected: Both positional argument [0] passing and keyword argument passing should be valid for name.
  • Actual: Only positional argument passing is available, keyword argument passing is unavailable in the situation.

[tune] Use built-in `inspect` for argument capture by zent1n0 · Pull Request #60049 · ray-project/ray · GitHub this should be a possible fix for this issue, but need code review before merge. CI pipelines all passed.

You are correct: in Ray 2.40.0, there is an issue where only positional argument passing is supported for certain methods (like Optuna’s suggest_* in Ray Tune), and keyword argument passing does not work as expected. The proposed fix in PR #60049 uses Python’s built-in inspect module to properly handle both positional and keyword arguments, addressing this limitation. The PR has passed CI but is pending code review and merge.

Would you like more detail on the technical cause or the workaround until this is merged?

Sources:

Hint: Mention @RunLLM in the post for followups.

@RunLLM I’m the author of the bugfix PR. I’ve been waiting some time for the PR to be reviewed, but no response till now. How can I find a proper assignee in Ray Tune maintainers?