Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"horizon": "5m",
"time_cohort_boundary_ms": 0,
"prompt_snapshot_id": "sha256:2b55ba0e724dfc9f5a040911e397058a09c6229e42064e4998739d617b368dcb",
"search_policy_snapshot_id": "sha256:d60632a69032a3f9c2a395916db8eac99876085d9057316df43fff004f468669",
"search_policy_snapshot_id": "sha256:7fe89feb6eaf5e207ffac08cf5b2e117f146695177651de8e3bad8a2a961abe8",
"search_budget": {
"max_candidates": 6,
"max_llm_calls": 2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"horizon": "5m",
"time_cohort_boundary_ms": 0,
"prompt_snapshot_id": "sha256:0816ebccf4c75ee6bdcfe315b253c84ddf1808a38687ebe3b924b87bd72a52a9",
"search_policy_snapshot_id": "sha256:d60632a69032a3f9c2a395916db8eac99876085d9057316df43fff004f468669",
"search_policy_snapshot_id": "sha256:7fe89feb6eaf5e207ffac08cf5b2e117f146695177651de8e3bad8a2a961abe8",
"search_budget": {
"max_candidates": 6,
"max_llm_calls": 2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ pub mod prediction_llm;
pub mod prediction_loop;
mod prediction_loop_fs;
pub mod prediction_mcts;
pub mod prediction_mcts_run;
mod prediction_policy_identity;
#[cfg(feature = "strategy-runtime")]
pub mod replay;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ pub fn current_prediction_policy_snapshot_id() -> String {
format!("sha256:{:x}", digest.finalize())
}

fn prediction_policy_sources() -> [(&'static str, &'static [u8]); 37] {
fn prediction_policy_sources() -> [(&'static str, &'static [u8]); 38] {
[
(
"crates/ploy-research/src/autofactor.rs",
Expand Down Expand Up @@ -297,6 +297,10 @@ fn prediction_policy_sources() -> [(&'static str, &'static [u8]); 37] {
"crates/ploy-research/src/prediction_mcts.rs",
include_bytes!("prediction_mcts.rs"),
),
(
"crates/ploy-research/src/prediction_mcts_run.rs",
include_bytes!("prediction_mcts_run.rs"),
),
(
"crates/ploy-research/src/prediction_loop_fs.rs",
include_bytes!("prediction_loop_fs.rs"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ impl WeightComponent {
}

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(tag = "kind", rename_all = "snake_case")]
#[serde(rename_all = "snake_case")]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve the version-1 checkpoint wire format

Any PredictionMctsCheckpoint serialized by the previous revision encodes actions as internally tagged objects such as {"kind":"increase","component":"market_midpoint"}, while this annotation change expects externally tagged objects. Because CHECKPOINT_VERSION remains 1 and deserialization fails before checkpoint validation can run, existing persisted checkpoints can no longer resume; retain the old representation or add a backward-compatible deserializer and migration test.

AGENTS.md reference: AGENTS.md:L31-L34

Useful? React with 👍 / 👎.

enum ExpansionAction {
Increase { component: WeightComponent },
LlmAdvisor { blend: LlmProbabilityBlendSpec },
Expand Down Expand Up @@ -743,6 +743,25 @@ mod tests {
assert_eq!(restored.checkpoint.nodes, engine.checkpoint.nodes);
}

#[test]
fn checkpoint_with_llm_action_round_trips_through_json() {
let mission = mission();
let engine = PredictionMctsEngine::new(
&mission,
blend("baseline"),
vec![blend("advisor")],
7,
1.4,
3,
)
.unwrap();
let checkpoint = engine.checkpoint().unwrap();
let bytes = serde_json::to_vec(&checkpoint).unwrap();
let restored: PredictionMctsCheckpoint = serde_json::from_slice(&bytes).unwrap();

assert_eq!(restored, checkpoint);
}

#[test]
fn held_out_and_execution_outputs_cannot_change_reward() {
let mission = mission();
Expand Down
Loading