Skip to content

Add surrogate free indexed strategies - #50

Merged
Lance-Drane merged 9 commits into
developfrom
indexed_strategies
Aug 20, 2026
Merged

Add surrogate free indexed strategies#50
Lance-Drane merged 9 commits into
developfrom
indexed_strategies

Conversation

@vreshniak

@vreshniak vreshniak commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Add Indexed Strategies Support and Improve Strategy Handling

Summary

This PR introduces indexed strategies (surrogate-free sampling methods) and refactors strategy handling throughout the DIAL service.

Features

Indexed Strategies

Adds new surrogate-free sampling strategies that don't require model training:

  • center: Sample at domain center point
  • corners: Sample at domain corner points
  • grid: Uniform grid-based sampling
  • chebyshev: Chebyshev node-based sampling
  • latin_hypercube: Latin hypercube design sampling

New Examples

  • Added 2d_rosenbrock_client_with_strategies.py demonstrating available strategies

Changes Overview

Files Modified
File Changes
src/dial_service/utilities/strategies.py Core indexed strategies implementation
src/dial_dataclass/dial_dataclass.py Updated strategy parameter definitions
src/dial_service/dial_service.py Service-level strategy validation
src/dial_service/core.py Strategy execution logic
scripts/2d_rosenbrock_client_with_strategies.py New example script

@vreshniak
vreshniak force-pushed the indexed_strategies branch from f867119 to 0f86d61 Compare July 22, 2026 17:50
@Lance-Drane

Copy link
Copy Markdown
Contributor

Could you add tests for the new strategies? Unit tests alone should be fine. You can either use the existing file in tests/unit/ or create your own file(s) in tests/unit (as long as the tests are in tests/unit/ I am impartial as to how they are organized)

API looks fine

Lance-Drane and others added 2 commits July 24, 2026 01:02
Signed-off-by: Lance-Drane <Lance-Drane@users.noreply.github.com>
@vreshniak

Copy link
Copy Markdown
Contributor Author

@Lance-Drane I added unit tests for indexed strategies

Comment on lines +402 to +418
SingleStrategyType = Literal[
#############################
# surrogate free strategies
'center',
'corners',
'grid',
'chebyshev',
'latin_hypercube',
'random',
#############################
# surrogate based strategies
'uncertainty',
'expected_improvement',
'upper_confidence_bound',
'upper_confidence_bound_nomad',
'polymer_acl_sampler',
]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that 'hypercube' was removed from SingleStrategyType, which is causing a few tests to fail:

  • test_hypercube_single_point
  • test_hypercube_single_point_discrete
  • test_hypercube_single_point_discrete_2D

Is this intended? We should either add hypercube back as a strategy or remove the failing tests.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added hypercube strategy back

@Lance-Drane

Copy link
Copy Markdown
Contributor

everything passes, merging

@Lance-Drane
Lance-Drane merged commit 378d97c into develop Aug 20, 2026
18 checks passed
@Lance-Drane
Lance-Drane deleted the indexed_strategies branch August 20, 2026 14:42
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.

2 participants