mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-09 11:24:53 +00:00
formatting
This commit is contained in:
parent
67cd625c82
commit
26c7bdeab2
@ -244,10 +244,12 @@ async fn batching_task(
|
||||
}
|
||||
// Create span for this batch to add context to inference calls
|
||||
let next_batch_size = entries.len();
|
||||
let next_batch_span = info_span!(parent: None, "batch", batch_size = next_batch_size);
|
||||
let next_batch_span =
|
||||
info_span!(parent: None, "batch", batch_size = next_batch_size);
|
||||
entries.iter_mut().for_each(|(_, entry)| {
|
||||
// Create a new span to link the batch back to this entry
|
||||
let entry_batch_span = info_span!(parent: &entry.span, "infer", batch_size = next_batch_size);
|
||||
let entry_batch_span =
|
||||
info_span!(parent: &entry.span, "infer", batch_size = next_batch_size);
|
||||
// Add relationship
|
||||
entry_batch_span.follows_from(&next_batch_span);
|
||||
// Update entry
|
||||
|
@ -118,10 +118,7 @@ fn init_logging(otlp_endpoint: Option<String>, json_output: bool) {
|
||||
.with_line_number(true);
|
||||
|
||||
let fmt_layer = match json_output {
|
||||
true => fmt_layer
|
||||
.json()
|
||||
.flatten_event(true)
|
||||
.boxed(),
|
||||
true => fmt_layer.json().flatten_event(true).boxed(),
|
||||
false => fmt_layer.boxed(),
|
||||
};
|
||||
layers.push(fmt_layer);
|
||||
|
@ -158,7 +158,8 @@ impl State {
|
||||
.drain(..next_batch_size)
|
||||
.for_each(|(id, mut entry)| {
|
||||
// Create a new span to link the batch back to this entry
|
||||
let entry_batch_span = info_span!(parent: &entry.span, "infer", batch_size = next_batch_size);
|
||||
let entry_batch_span =
|
||||
info_span!(parent: &entry.span, "infer", batch_size = next_batch_size);
|
||||
// Add relationship
|
||||
entry_batch_span.follows_from(&next_batch_span);
|
||||
// Update entry
|
||||
|
Loading…
Reference in New Issue
Block a user