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
12 changes: 9 additions & 3 deletions asap-planner-rs/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<PathBuf>,

/// 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<PathBuf>,

/// 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<PathBuf>,

/// MILP only. Objective weight on CPU-sec/sec. Default: rqe-optimizer's.
Expand Down Expand Up @@ -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()
Expand Down
38 changes: 38 additions & 0 deletions asap-tools/experiments/materialize_saved_plan.sh
Original file line number Diff line number Diff line change
@@ -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[@]}"
Loading