PineForge HPO 1.11.0
Native hyperparameter optimization for PineForge strategies
Loading...
Searching...
No Matches
pineforge_hpo.warm_binary Namespace Reference

Functions

bytes encode_warm_block (StudySpec study, Sequence[Mapping[str, Any]] trials, *str|None sampler_state=None, Mapping[str, Any]|None symbol_feeds_record=None, ContinuationDataContext|None data_context=None)
 
int write_warm_block (BinaryIO output, StudySpec study, Sequence[Mapping[str, Any]] trials, *str|None sampler_state=None, Mapping[str, Any]|None symbol_feeds_record=None, ContinuationDataContext|None data_context=None)
 
tuple[dict[str, Any],...] decode_warm_blocks (StudySpec study, bytes content, *ContinuationDataContext|None data_context=None, Mapping[str, Any]|None symbol_feeds_record=None)
 

Variables

str MAGIC = b"PFHWARM\0"
 
str STATE_MAGIC = b"PFHSTATE"
 
int VERSION = 2
 
 HEADER = struct.Struct("<8sHHIQQIIII32s")
 
int NULL_BITS = 0x7FF8000000000000
 
tuple STATES
 

Detailed Description

Dependency-free reference writer for concatenable warm-start v2 blocks.

Function Documentation

◆ decode_warm_blocks()

tuple[dict[str, Any], ...] pineforge_hpo.warm_binary.decode_warm_blocks ( StudySpec  study,
bytes  content,
*ContinuationDataContext | None   data_context = None,
Mapping[str, Any] | None   symbol_feeds_record = None 
)
Internal reference reader; public binary preflight still uses the native loader.

Definition at line 293 of file warm_binary.py.

◆ encode_warm_block()

bytes pineforge_hpo.warm_binary.encode_warm_block ( StudySpec  study,
Sequence[Mapping[str, Any]]  trials,
*str | None   sampler_state = None,
Mapping[str, Any] | None   symbol_feeds_record = None,
ContinuationDataContext | None   data_context = None 
)
Encode every attempted trial in one chunk, sorting rows by uint64 trial ID.

Parameters use lexicographic name order. Missing v0.5 constraint values become
canonical nulls; feasibility continues to come from state, exactly as in v0.5.
Concatenate independent returned blocks without adding separators or a footer.

Definition at line 60 of file warm_binary.py.

Referenced by pineforge_hpo.warm_binary.write_warm_block().

◆ write_warm_block()

int pineforge_hpo.warm_binary.write_warm_block ( BinaryIO  output,
StudySpec  study,
Sequence[Mapping[str, Any]]  trials,
*str | None   sampler_state = None,
Mapping[str, Any] | None   symbol_feeds_record = None,
ContinuationDataContext | None   data_context = None 
)
Write one validated chunk to a binary stream; return its byte count.

Definition at line 247 of file warm_binary.py.

References pineforge_hpo.warm_binary.encode_warm_block().

Variable Documentation

◆ HEADER

pineforge_hpo.warm_binary.HEADER = struct.Struct("<8sHHIQQIIII32s")

Definition at line 28 of file warm_binary.py.

◆ MAGIC

str pineforge_hpo.warm_binary.MAGIC = b"PFHWARM\0"

Definition at line 25 of file warm_binary.py.

◆ NULL_BITS

int pineforge_hpo.warm_binary.NULL_BITS = 0x7FF8000000000000

Definition at line 29 of file warm_binary.py.

◆ STATE_MAGIC

str pineforge_hpo.warm_binary.STATE_MAGIC = b"PFHSTATE"

Definition at line 26 of file warm_binary.py.

◆ STATES

tuple pineforge_hpo.warm_binary.STATES
Initial value:
1= (
2 "ok",
3 "constraint_violation",
4 "engine_error",
5 "objective_error",
6 "constraint_error",
7 "trial_error",
8 "trial_timeout",
9 "pruned",
10 "partial",
11)

Definition at line 30 of file warm_binary.py.

◆ VERSION

int pineforge_hpo.warm_binary.VERSION = 2

Definition at line 27 of file warm_binary.py.