|
PineForge HPO 0.1.0
Native hyperparameter optimization for PineForge strategies
|
Independent, single-objective Tree-structured Parzen Estimator sampler. More...
#include <pineforge/hpo/sampler.hpp>
Inheritance diagram for pineforge::hpo::TpeSampler:Public Member Functions | |
| TpeSampler (SearchSpace space, std::uint64_t seed, ObjectiveDirection direction=ObjectiveDirection::Maximize, std::uint64_t max_candidates=0, TpeSamplerConfig config={}, CandidatePolicy candidate_policy=CandidatePolicy::SamplerDefault) | |
Constructs a native TPE sampler; max_candidates == 0 means unbounded generation. | |
| ~TpeSampler () override | |
| TpeSampler (const TpeSampler &)=delete | |
| TpeSampler & | operator= (const TpeSampler &)=delete |
| TpeSampler (TpeSampler &&) noexcept | |
| TpeSampler & | operator= (TpeSampler &&) noexcept |
| std::optional< Candidate > | next () override |
| Alias for ask(). | |
| std::optional< Candidate > | ask () |
| Atomically issues and reserves the next candidate. | |
| void | tell (std::uint64_t candidate_id, double objective_value) |
| Completes an outstanding candidate with its original finite objective value. | |
| void | abandon (std::uint64_t candidate_id) |
| Removes an outstanding failed or pruned candidate without training TPE. | |
| void | reset () override |
| Restores the seeded initial state and clears finite-space reservations. | |
| std::uint64_t | generated () const noexcept override |
| Returns the number of candidates issued since construction or reset. | |
| std::uint64_t | completed () const noexcept |
| Returns the number of candidates completed through tell(). | |
| std::uint64_t | outstanding () const noexcept |
| Returns the number of candidates awaiting tell() or abandon(). | |
| std::uint64_t | duplicate_proposals_skipped () const noexcept |
| Returns internal duplicate proposals rejected by a finite policy. | |
| std::uint64_t | seed () const noexcept |
| Returns the reproducibility seed. | |
| ObjectiveDirection | direction () const noexcept |
| Returns the configured optimization direction. | |
| const TpeSamplerConfig & | config () const noexcept |
| Returns the immutable TPE tuning configuration. | |
| CandidatePolicy | candidate_policy () const noexcept |
| Returns the configured uniqueness/coverage policy. | |
Public Member Functions inherited from pineforge::hpo::Sampler | |
| virtual | ~Sampler ()=default |
Independent, single-objective Tree-structured Parzen Estimator sampler.
Numeric dimensions use bounded Gaussian mixtures in normalized coordinates; integer and stepped-real dimensions decode onto legal grids. Boolean and categorical dimensions use smoothed weighted histograms. Fitted candidate generation samples from the good model l(x) and retains the proposal maximizing l(x) / g(x).
next() is an alias for ask(). Every returned candidate remains outstanding until tell() or abandon() receives its ID. Public methods are thread-safe, although deterministic replay requires the same ordering of ask/tell/abandon calls.
Definition at line 132 of file sampler.hpp.
| pineforge::hpo::TpeSampler::TpeSampler | ( | SearchSpace | space, |
| std::uint64_t | seed, | ||
| ObjectiveDirection | direction = ObjectiveDirection::Maximize, |
||
| std::uint64_t | max_candidates = 0, |
||
| TpeSamplerConfig | config = {}, |
||
| CandidatePolicy | candidate_policy = CandidatePolicy::SamplerDefault |
||
| ) |
Constructs a native TPE sampler; max_candidates == 0 means unbounded generation.
Finite policies validate exact cardinality and budget compatibility at construction.
| std::invalid_argument | for invalid configuration, direction, policy, or finite policy/budget combination. |
|
override |
|
delete |
|
noexcept |
| void pineforge::hpo::TpeSampler::abandon | ( | std::uint64_t | candidate_id | ) |
Removes an outstanding failed or pruned candidate without training TPE.
| std::invalid_argument | when candidate_id is not outstanding. |
| std::optional< Candidate > pineforge::hpo::TpeSampler::ask | ( | ) |
Atomically issues and reserves the next candidate.
Returns std::nullopt at the configured budget or exact finite-space exhaustion.
|
inlinenoexcept |
Returns the configured uniqueness/coverage policy.
Definition at line 188 of file sampler.hpp.
|
noexcept |
Returns the number of candidates completed through tell().
|
inlinenoexcept |
Returns the immutable TPE tuning configuration.
Definition at line 186 of file sampler.hpp.
|
inlinenoexcept |
Returns the configured optimization direction.
Definition at line 184 of file sampler.hpp.
|
noexcept |
Returns internal duplicate proposals rejected by a finite policy.
|
overridevirtualnoexcept |
Returns the number of candidates issued since construction or reset.
Implements pineforge::hpo::Sampler.
|
overridevirtual |
Alias for ask().
Implements pineforge::hpo::Sampler.
|
delete |
|
noexcept |
|
noexcept |
|
overridevirtual |
Restores the seeded initial state and clears finite-space reservations.
| std::logic_error | while a candidate is outstanding, preventing a late pre-reset result from being accepted after candidate IDs are reused. |
Implements pineforge::hpo::Sampler.
|
inlinenoexcept |
Returns the reproducibility seed.
Definition at line 182 of file sampler.hpp.
| void pineforge::hpo::TpeSampler::tell | ( | std::uint64_t | candidate_id, |
| double | objective_value | ||
| ) |
Completes an outstanding candidate with its original finite objective value.
| std::invalid_argument | for a non-finite value or non-outstanding ID. |