From 1409a8067c6a4e6670173689675f1e2a5be08c1f Mon Sep 17 00:00:00 2001 From: Milind Srivastava Date: Tue, 13 Oct 2026 13:51:50 -0400 Subject: [PATCH] fix(planner): disable non-parity MILP CLI --- asap-planner-rs/src/main.rs | 12 ++++-- .../experiments/materialize_saved_plan.sh | 38 +++++++++++++++++++ 2 files changed, 47 insertions(+), 3 deletions(-) create mode 100755 asap-tools/experiments/materialize_saved_plan.sh diff --git a/asap-planner-rs/src/main.rs b/asap-planner-rs/src/main.rs index 44b9f057..929adfa2 100644 --- a/asap-planner-rs/src/main.rs +++ b/asap-planner-rs/src/main.rs @@ -89,18 +89,18 @@ struct Args { /// MILP only. YAML workload facts: per metric, positive `value_range` and /// `cardinality` per label set, including all labels (the series count), /// plus the `shape` of each grouping sketches may serve. - #[arg(long = "workload-facts", required_if_eq("planner", "milp"))] + #[arg(long = "workload-facts")] workload_facts: Option, /// MILP only. The flat cost table sketch-bench's /// `study_saturation.py --phase optimizer-cost` writes /// (`rqe_atomic_costs.json`). - #[arg(long = "atomic-costs", required_if_eq("planner", "milp"))] + #[arg(long = "atomic-costs")] atomic_costs: Option, /// MILP only. sketch-bench's saturation-study directory: sketch accuracy /// is read off its error-vs-N curves at each grouping's `shape`. - #[arg(long = "saturation-dir", required_if_eq("planner", "milp"))] + #[arg(long = "saturation-dir")] saturation_dir: Option, /// MILP only. Objective weight on CPU-sec/sec. Default: rqe-optimizer's. @@ -142,6 +142,12 @@ fn main() -> anyhow::Result<()> { EngineArg::Precompute => StreamingEngine::Precompute, }; + if args.planner == PlannerArg::Milp { + anyhow::bail!( + "--planner milp is temporarily disabled; use --planner saved for sketch-bench eval plans" + ); + } + if args.planner != PlannerArg::Saved { anyhow::ensure!( args.plan.is_none() diff --git a/asap-tools/experiments/materialize_saved_plan.sh b/asap-tools/experiments/materialize_saved_plan.sh new file mode 100755 index 00000000..0f2cb6aa --- /dev/null +++ b/asap-tools/experiments/materialize_saved_plan.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash +# Materialize one already-solved sketch-bench eval plan; it never re-solves it. +set -euo pipefail + +usage() { + echo "usage: $0 WORKLOAD_TABLE PLAN METHOD WEIGHTS SCRAPE_INTERVAL_MS OUTPUT_DIR [SLA_MS]" >&2 + exit 2 +} + +if (( $# < 6 || $# > 7 )); then + usage +fi + +workload_table=$1 +plan=$2 +method=$3 +weights=$4 +scrape_interval_ms=$5 +output_dir=$6 + +script_dir=$(CDPATH='' cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd) +repo_root=$(CDPATH='' cd -- "$script_dir/../.." && pwd) + +args=( + --planner saved + --workload-table "$workload_table" + --plan "$plan" + --method "$method" + --weights "$weights" + --data-ingestion-interval-ms "$scrape_interval_ms" + --streaming_engine precompute + --output_dir "$output_dir" +) +if (( $# == 7 )); then + args+=(--sla-ms "$7") +fi + +cargo run --manifest-path "$repo_root/Cargo.toml" -p asap_planner --bin asap-planner -- "${args[@]}"