Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 10, 2026

BlendSearch issues a warning when using Ray Tune domains in non-hierarchical search spaces: "You passed a space parameter to OptunaSearch that contained unresolved search space definitions."

from ray import tune
from flaml.tune.searcher.blendsearch import BlendSearch

# Previously triggered warning
searcher = BlendSearch(
    metric='loss',
    mode='min',
    space={'lr': tune.uniform(0.001, 0.1), 'depth': tune.randint(1, 10)}
)

Changes

  • blendsearch.py: Always use define-by-run mode when passing spaces to Ray's OptunaSearch, not just for hierarchical spaces. Ray's OptunaSearch expects either Optuna distributions or a callable define-by-run function, not Ray Tune domain objects.

  • test_searcher.py: Add regression test capturing stderr to verify warning is eliminated.

CFO remains unaffected (doesn't use global search). The evaluated_rewards parameter continues to be correctly set to None for define-by-run mode.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • metadata.google.internal
    • Triggering command: /usr/bin/python3 /usr/bin/python3 /home/REDACTED/.local/lib/python3.12/site-packages/ray/dashboard/dashboard.py --host=127.0.0.1 --port=8265 --port-retries=50 --temp-dir=/tmp/ray --log-dir=/tmp/ray/session_2026-01-10_08-37-43_892531_3832/logs --session-dir=/tmp/ray/session_2026-01-10_08-37-43_892531_3832 --logging-rotate-bytes=536870912 --logging-rotate-backup-count=5 --gcs-address=127.0.0.1:43919 --cluster-id-hex=97d382d349ced6bc4406879caed009b547b42c9aad36ac5cd3305571 --node-ip-address=127.0.0.1 --stdout-filepath=/tmp/ray/session_2026-01-10_08-37-43_892531_3832/logs/dashboard.out --stderr-filepath=/tmp/ray/session_2026-01-10_08-37-43_892531_3832/logs/dashboard.err --minimal pull.rebase (dns block)
    • Triggering command: /usr/bin/python3 /usr/bin/python3 /home/REDACTED/.local/lib/python3.12/site-packages/ray/dashboard/dashboard.py --host=127.0.0.1 --port=8265 --port-retries=50 --temp-dir=/tmp/ray --log-dir=/tmp/ray/session_2026-01-10_08-38-34_168600_4240/logs --session-dir=/tmp/ray/session_2026-01-10_08-38-34_168600_4240 --logging-rotate-bytes=536870912 --logging-rotate-backup-count=5 --gcs-address=127.0.0.1:46054 --cluster-id-hex=fb1fa4f56b7d156e008fbba8f39cdf69844e221bfd3ffd5b729b74c4 --node-ip-address=127.0.0.1 --stdout-filepath=/tmp/ray/session_2026-01-10_08-38-34_168600_4240/logs/dashboard.out --stderr-filepath=/tmp/ray/session_2026-01-10_08-38-34_168600_4240/logs/dashboard.err --minimal .js (dns block)
    • Triggering command: /usr/bin/python3 /usr/bin/python3 /home/REDACTED/.local/lib/python3.12/site-packages/ray/dashboard/dashboard.py --host=127.0.0.1 --port=8265 --port-retries=50 --temp-dir=/tmp/ray --log-dir=/tmp/ray/session_2026-01-10_08-40-16_435306_4778/logs --session-dir=/tmp/ray/session_2026-01-10_08-40-16_435306_4778 --logging-rotate-bytes=536870912 --logging-rotate-backup-count=5 --gcs-address=127.0.0.1:45251 --cluster-id-hex=12830389913f810d52524c2e0628c76352cbd9da533c1b2c9ada2482 --node-ip-address=127.0.0.1 --stdout-filepath=/tmp/ray/session_2026-01-10_08-40-16_435306_4778/logs/dashboard.out --stderr-filepath=/tmp/ray/session_2026-01-10_08-40-16_435306_4778/logs/dashboard.err --minimal (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>BlendSearch in UDF mode</issue_title>
<issue_description>When I select the BlendSearch search algorithm, I consistently encounter the following warning, whereas it does not appear when using CFO:

You passed a space parameter to OptunaSearch that contained unresolved search space definitions. OptunaSearch should however be instantiated with fully configured search spaces only. To use Ray Tune's automatic search space conversion, pass the space definition as part of the param_space argument to tune.Tuner() instead.</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits January 10, 2026 08:38
Co-authored-by: thinkall <3197038+thinkall@users.noreply.github.com>
Co-authored-by: thinkall <3197038+thinkall@users.noreply.github.com>
Co-authored-by: thinkall <3197038+thinkall@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix unresolved search space warnings in BlendSearch Fix BlendSearch OptunaSearch warning for non-hierarchical spaces with Ray Tune domains Jan 10, 2026
Copilot AI requested a review from thinkall January 10, 2026 08:42
@thinkall thinkall marked this pull request as ready for review January 19, 2026 14:37
@thinkall thinkall merged commit 67bdcde into main Jan 19, 2026
16 checks passed
@thinkall thinkall deleted the copilot/fix-blendsearch-udf-warning branch January 19, 2026 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BlendSearch in UDF mode

3 participants