mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-09 19:34: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
|
// Create span for this batch to add context to inference calls
|
||||||
let next_batch_size = entries.len();
|
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)| {
|
entries.iter_mut().for_each(|(_, entry)| {
|
||||||
// Create a new span to link the batch back to this 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
|
// Add relationship
|
||||||
entry_batch_span.follows_from(&next_batch_span);
|
entry_batch_span.follows_from(&next_batch_span);
|
||||||
// Update entry
|
// Update entry
|
||||||
|
@ -118,10 +118,7 @@ fn init_logging(otlp_endpoint: Option<String>, json_output: bool) {
|
|||||||
.with_line_number(true);
|
.with_line_number(true);
|
||||||
|
|
||||||
let fmt_layer = match json_output {
|
let fmt_layer = match json_output {
|
||||||
true => fmt_layer
|
true => fmt_layer.json().flatten_event(true).boxed(),
|
||||||
.json()
|
|
||||||
.flatten_event(true)
|
|
||||||
.boxed(),
|
|
||||||
false => fmt_layer.boxed(),
|
false => fmt_layer.boxed(),
|
||||||
};
|
};
|
||||||
layers.push(fmt_layer);
|
layers.push(fmt_layer);
|
||||||
|
@ -158,7 +158,8 @@ impl State {
|
|||||||
.drain(..next_batch_size)
|
.drain(..next_batch_size)
|
||||||
.for_each(|(id, mut entry)| {
|
.for_each(|(id, mut entry)| {
|
||||||
// Create a new span to link the batch back to this 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
|
// Add relationship
|
||||||
entry_batch_span.follows_from(&next_batch_span);
|
entry_batch_span.follows_from(&next_batch_span);
|
||||||
// Update entry
|
// Update entry
|
||||||
|
Loading…
Reference in New Issue
Block a user