Skip to content

Commit

Permalink
Rename data key.
Browse files Browse the repository at this point in the history
  • Loading branch information
daemontus committed Oct 8, 2024
1 parent 568ba46 commit e445f3d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1051,11 +1051,13 @@ async fn get_control_results() -> BackendResponse {

let robustness: BigInt = p_card / u_card;
let robustness: f64 = robustness.to_f64().unwrap_or(f64::NAN) / 1_000_000.0;
response.push(object! {
"perturbation": key.clone(),
"interpretation_count": value.exact_cardinality().to_u64().unwrap_or(u64::MAX),
"robustness": robustness,
}).unwrap();
response
.push(object! {
"perturbation": key.clone(),
"color_count": value.exact_cardinality().to_u64().unwrap_or(u64::MAX),
"robustness": robustness,
})
.unwrap();
}
BackendResponse::ok(response.to_string())
} else {
Expand Down

0 comments on commit e445f3d

Please sign in to comment.