|
PineForge HPO 0.1.0
Native hyperparameter optimization for PineForge strategies
|
Adaptive derivative-free optimizer backed by dlib::global_function_search.
More...
#include <pineforge/hpo/sampler.hpp>
Inheritance diagram for pineforge::hpo::DlibGlobalSampler:Public Member Functions | |
| DlibGlobalSampler (SearchSpace space, std::uint64_t seed, ObjectiveDirection direction=ObjectiveDirection::Maximize, std::uint64_t max_candidates=0) | |
Constructs a dlib global sampler; max_candidates == 0 means unbounded generation. | |
| ~DlibGlobalSampler () override | |
| DlibGlobalSampler (const DlibGlobalSampler &)=delete | |
| DlibGlobalSampler & | operator= (const DlibGlobalSampler &)=delete |
| DlibGlobalSampler (DlibGlobalSampler &&) noexcept | |
| DlibGlobalSampler & | operator= (DlibGlobalSampler &&) noexcept |
| std::optional< Candidate > | next () override |
| Alias for ask(). | |
| std::optional< Candidate > | ask () |
Issues the next dlib evaluation request, or std::nullopt at the budget. | |
| void | tell (std::uint64_t candidate_id, double objective_value) |
| Completes an outstanding request with its original finite objective value. | |
| void | abandon (std::uint64_t candidate_id) |
| Cancels an outstanding failed or pruned trial without fabricating a score. | |
| void | reset () override |
| Cancels all outstanding requests and restores the seeded initial state. | |
| 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 | seed () const noexcept |
| Returns the reproducibility seed. | |
| ObjectiveDirection | direction () const noexcept |
| Returns the configured optimization direction. | |
Public Member Functions inherited from pineforge::hpo::Sampler | |
| virtual | ~Sampler ()=default |
Adaptive derivative-free optimizer backed by dlib::global_function_search.
next() is an alias for ask(). Every returned candidate remains outstanding until tell() or abandon() receives its ID. Multiple candidates may be outstanding, allowing external concurrent evaluation while retaining dlib's native ask/tell behavior. Public operations are serialized internally.
Definition at line 208 of file sampler.hpp.
| pineforge::hpo::DlibGlobalSampler::DlibGlobalSampler | ( | SearchSpace | space, |
| std::uint64_t | seed, | ||
| ObjectiveDirection | direction = ObjectiveDirection::Maximize, |
||
| std::uint64_t | max_candidates = 0 |
||
| ) |
Constructs a dlib global sampler; max_candidates == 0 means unbounded generation.
A fixed seed and ask/tell ordering are deterministic.
| std::invalid_argument | when the seed exceeds dlib's signed 32-bit range or the search space cannot be represented by the adapter. |
|
override |
|
delete |
|
noexcept |
| void pineforge::hpo::DlibGlobalSampler::abandon | ( | std::uint64_t | candidate_id | ) |
Cancels an outstanding failed or pruned trial without fabricating a score.
| std::invalid_argument | when candidate_id is not outstanding. |
| std::optional< Candidate > pineforge::hpo::DlibGlobalSampler::ask | ( | ) |
Issues the next dlib evaluation request, or std::nullopt at the budget.
|
noexcept |
Returns the number of candidates completed through tell().
|
inlinenoexcept |
Returns the configured optimization direction.
Definition at line 253 of file sampler.hpp.
|
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 |
Cancels all outstanding requests and restores the seeded initial state.
Implements pineforge::hpo::Sampler.
|
inlinenoexcept |
Returns the reproducibility seed.
Definition at line 251 of file sampler.hpp.
| void pineforge::hpo::DlibGlobalSampler::tell | ( | std::uint64_t | candidate_id, |
| double | objective_value | ||
| ) |
Completes an outstanding request with its original finite objective value.
Minimize mode negates the value before passing it to dlib, whose optimizer maximizes.
| std::invalid_argument | for a non-finite value or non-outstanding ID. |