Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 20, 2026

Documentation Update: Add Hierarchical Search Space

This PR adds comprehensive documentation for hierarchical (conditional) search spaces to the Tune User Defined Function page, addressing the request in the issue.

Completed Tasks

  • Explore the repository to understand hierarchical search space implementation
  • Review existing documentation structure
  • Review test cases and examples for hierarchical search space usage
  • Add hierarchical search space section to documentation with:
    • Explanation of what hierarchical search spaces are
    • Syntax and usage examples using tune.choice() with nested dictionaries
    • Example showing conditional hyperparameter dependencies
    • Code example demonstrating practical usage
  • Review and validate documentation changes
    • Added clarifying comments to example placeholder functions
    • Validated all examples syntactically
    • Tested examples work with FLAML API
  • Run pre-commit to fix formatting issues

Summary

The documentation now includes a new "Hierarchical search space" section in the Search space subsection. It provides:

  1. Clear explanation: Describes what hierarchical search spaces are and when they're useful
  2. Syntax guidance: Explains how to use tune.choice() with nested dictionaries
  3. Three comprehensive examples:
    • Model selection with model-specific hyperparameters
    • Mixed choices with constants and nested spaces
    • Nested hierarchical spaces for organizing related hyperparameters
  4. Important usage notes: Compatibility with search algorithms and usage tips

All examples have been validated and formatting has been fixed with pre-commit.

Original prompt

This section details on the original issue you should resolve

<issue_title>Add hierarchical search space to the documentation</issue_title>
<issue_description>https://microsoft.github.io/FLAML/docs/Use-Cases/Tune-User-Defined-Function#search-space</issue_description>

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


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits January 20, 2026 04:11
…tion.md

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] Add hierarchical search space to the documentation Add hierarchical search space documentation Jan 20, 2026
Copilot AI requested a review from thinkall January 20, 2026 04:14
@thinkall thinkall marked this pull request as ready for review January 20, 2026 14:49
@thinkall
Copy link
Collaborator

@copilot, run "pre-commit run --all-files" to fix formatting issues.

Co-authored-by: thinkall <3197038+thinkall@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 20, 2026

@copilot, run "pre-commit run --all-files" to fix formatting issues.

Done! Pre-commit has been run and formatting issues have been fixed in commit 554aea5.

@thinkall thinkall merged commit 6e59103 into main Jan 21, 2026
8 checks passed
@thinkall thinkall deleted the copilot/add-hierarchical-search-space branch January 21, 2026 06:41
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.

Add hierarchical search space to the documentation

3 participants