Skip to content

Commit f05244f

Browse files
authored
Merge branch 'main' into main
2 parents 18b9d34 + e51743a commit f05244f

File tree

37 files changed

+229
-83
lines changed

37 files changed

+229
-83
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ panic = "deny"
8282
print_stderr = "deny"
8383
print_stdout = "deny"
8484
redundant_closure_for_method_calls = "deny"
85+
semicolon-if-nothing-returned = "deny"
8586
todo = "deny"
8687
trivially_copy_pass_by_ref = "deny"
8788
unimplemented = "deny"

clients/rust/src/lib.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -410,8 +410,7 @@ impl Client {
410410
.await
411411
.map_err(err_to_http)
412412
})
413-
.await?
414-
.0)
413+
.await?)
415414
}
416415
}
417416
}
@@ -1185,7 +1184,7 @@ impl Client {
11851184
ClientMode::HTTPGateway(client) => {
11861185
// Acquire the lock on the gateway version
11871186
let mut gateway_version = client.gateway_version.lock().await;
1188-
*gateway_version = Some(version)
1187+
*gateway_version = Some(version);
11891188
}
11901189
// Should never be called
11911190
ClientMode::EmbeddedGateway { .. } => {}

evaluations/src/evaluators/llm_judge/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ fn prepare_messages_input(input: &ClientInput) -> Result<Vec<ClientInputMessage>
297297
content: vec![ClientInputMessageContent::Text(TextKind::Text {
298298
text: system_message,
299299
})],
300-
})
300+
});
301301
}
302302
_ => {
303303
bail!("System message is not a string or object");

evaluations/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ async fn main() -> Result<()> {
2727
match &result {
2828
Ok(_) => info!(evaluation_run_id = %evaluation_run_id, "Evaluation completed successfully"),
2929
Err(e) => {
30-
tracing::error!(evaluation_run_id = %evaluation_run_id, error = %e, "Evaluation failed")
30+
tracing::error!(evaluation_run_id = %evaluation_run_id, error = %e, "Evaluation failed");
3131
}
3232
}
3333

evaluations/src/stats.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ impl EvaluationStats {
5454
}
5555
match evaluation_update {
5656
EvaluationUpdate::Success(evaluation_info) => {
57-
self.evaluation_infos.push(evaluation_info)
57+
self.evaluation_infos.push(evaluation_info);
5858
}
5959
EvaluationUpdate::Error(evaluation_error) => {
6060
self.evaluation_errors.push(evaluation_error);

evaluations/tests/tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1734,7 +1734,7 @@ async fn run_evaluations_best_of_3() {
17341734
assert!(model_inference["system"]
17351735
.as_str()
17361736
.unwrap()
1737-
.starts_with("You are an assistant tasked with re-ranking"))
1737+
.starts_with("You are an assistant tasked with re-ranking"));
17381738
}
17391739
}
17401740
assert_eq!(happy_count, 3);
@@ -1922,7 +1922,7 @@ async fn run_evaluations_mixture_of_3() {
19221922
assert!(model_inference["system"]
19231923
.as_str()
19241924
.unwrap()
1925-
.starts_with("You have been provided with a set of responses from various"))
1925+
.starts_with("You have been provided with a set of responses from various"));
19261926
}
19271927
}
19281928
assert_eq!(happy_count, 3);

internal/tensorzero-derive/tests/deserialize.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ fn test_good_deserialize() {
3333
},
3434
field2: true,
3535
}
36-
)
36+
);
3737
}
3838

3939
#[test]

internal/tensorzero-node/lib/bindings/GatewayConfig.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ export type GatewayConfig = {
1111
export: ExportConfig;
1212
base_path: string | null;
1313
unstable_error_json: boolean;
14+
unstable_disable_feedback_target_validation: boolean;
1415
};

tensorzero-core/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ fn main() {
88
if std::env::var("TENSORZERO_SKIP_BUILD_INFO").is_ok() {
99
println!("cargo:rerun-if-env-changed=TENSORZERO_SKIP_BUILD_INFO");
1010
}
11-
built::write_built_file().expect("Failed to acquire build-time information")
11+
built::write_built_file().expect("Failed to acquire build-time information");
1212
}

tensorzero-core/src/config_parser/gateway.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ pub struct UninitializedGatewayConfig {
2525
// If set, all of the HTTP endpoints will have this path prepended.
2626
// E.g. a base path of `/custom/prefix` will cause the inference endpoint to become `/custom/prefix/inference`.
2727
pub base_path: Option<String>,
28+
// If set to `true`, disables validation on feedback queries (read from ClickHouse to check that the target is valid)
29+
#[serde(default)]
30+
pub unstable_disable_feedback_target_validation: bool,
2831
/// If enabled, adds an 'error_json' field alongside the human-readable 'error' field
2932
/// in HTTP error responses. This contains a JSON-serialized version of the error.
3033
/// While 'error_json' will always be valid JSON when present, the exact contents is unstable,
@@ -63,6 +66,8 @@ impl UninitializedGatewayConfig {
6366
export: self.export,
6467
base_path: self.base_path,
6568
unstable_error_json: self.unstable_error_json,
69+
unstable_disable_feedback_target_validation: self
70+
.unstable_disable_feedback_target_validation,
6671
})
6772
}
6873
}
@@ -80,6 +85,7 @@ pub struct GatewayConfig {
8085
// E.g. a base path of `/custom/prefix` will cause the inference endpoint to become `/custom/prefix/inference`.
8186
pub base_path: Option<String>,
8287
pub unstable_error_json: bool,
88+
pub unstable_disable_feedback_target_validation: bool,
8389
}
8490

8591
fn serialize_optional_socket_addr<S>(

0 commit comments

Comments
 (0)