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
9 changes: 7 additions & 2 deletions crates/devtools/src/bin/stage_pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,14 @@
// - stage3_plan_selection: the selected candidate, chosen among all candidates;
// the shown candidates' costs and accepted accuracy (per query: the
// target's metric or null when not set, the accepted guarantee's
// metric or null when exact, the sketches read and a one-line
// metric or null when exact or accepted regardless of guarantee,
// whether the deployment's accuracy model accepted it directly,
// whatever its guarantee says (`accepted_regardless_of_guarantee`),
// the sketches read and a one-line
// summary), and every other shown candidate under `rejected` with
// its `cause`: a failed check (`failure_probability_resize_failed`,
// `accuracy_target_missed`, `raw_data_not_retained`,
// `accuracy_target_missed`, `count_min_weights_not_proven_non_negative`,
// `no_accuracy_guarantee`, `raw_data_not_retained`,
// `latency_bound_exceeded`, `over_cluster_capacity`) or a loss under
// the cost model (`costlier`, `slower`, `more_memory`,
// `not_lowest_latency_on_pareto_front`, `dominated`,
Expand Down Expand Up @@ -617,6 +621,7 @@ fn plan_selection_json(
json!({
"target_metric": accepted.target_metric,
"accepted_metric": accepted.accepted_metric,
"accepted_regardless_of_guarantee": accepted.accepted_regardless_of_guarantee,
"sketches": accepted.sketches,
"summary": accepted.to_string(),
})
Expand Down
13 changes: 5 additions & 8 deletions crates/frontend-promql/tests/univmon_candidates.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use std::rc::Rc;

use asap_logical_asap_optimization::accuracy::{AccuracyModel, DefaultAccuracyModel};
use asap_logical_asap_optimization::accuracy::estimators::local_guarantee;
use asap_logical_asap_optimization::accuracy::satisfies;
mod support;
use asap_types::ir::cse::share_common_sub_dags;
use asap_types::ir::properties::AccuracyMetric;
Expand Down Expand Up @@ -88,9 +89,7 @@ fn four_evaluations_size_their_value_frequency_states_and_keep_honest_guarantees
Some(true)
);
assert_eq!(guarantee.spec.failure_probability.evaluate(), None);
assert!(DefaultAccuracyModel
.local_guarantee(family, query)
.is_none());
assert!(local_guarantee(family, query).is_none());
}
1 => {
assert!(matches!(
Expand All @@ -102,7 +101,7 @@ fn four_evaluations_size_their_value_frequency_states_and_keep_honest_guarantees
2 => {
let guarantee = guarantee.expect("an L2 guarantee");
assert_eq!(guarantee.spec.accuracy_metric, AccuracyMetric::Relative);
assert!(DefaultAccuracyModel.satisfies(
assert!(satisfies(
guarantee,
&AccuracyTarget::max_error(0.02).accuracy_metric(AccuracyMetric::Relative)
));
Expand All @@ -111,9 +110,7 @@ fn four_evaluations_size_their_value_frequency_states_and_keep_honest_guarantees
// Entropy has no certified bound, so composition certifies nothing.
_ => {
assert!(guarantee.is_none());
assert!(DefaultAccuracyModel
.local_guarantee(family, query)
.is_none());
assert!(local_guarantee(family, query).is_none());
}
}
post_asap_dag(root);
Expand Down
3 changes: 2 additions & 1 deletion crates/integration-tests/tests/promql_to_post_asap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ use std::rc::Rc;
use asap_integration_tests::fixtures::lower_promql;
use asap_integration_tests::planning::logical_candidates;
use asap_integration_tests::post_asap::{at_ingestion, at_ingestion_post_asap_dag, post_asap_dag};
use asap_logical_asap_optimization::accuracy::{AccuracyEvidenceProvider, OperandDomain};
use asap_logical_asap_optimization::accuracy::OperandDomain;
use asap_physical_asap_optimization::PhysicalCandidate;
use asap_plan_selection::AccuracyEvidenceProvider;
use asap_plan_selection::PlanningModels;
use asap_plan_selection::Selection;
use asap_types::ir::operator::operator_properties::Reduction;
Expand Down
Loading
Loading