mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-11 04:14:52 +00:00
fix: do not leak inputs on error
This commit is contained in:
parent
96a982ad8f
commit
ca9fc44cb5
@ -82,7 +82,7 @@ impl Infer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Add a new request to the queue and return a stream of InferStreamResponse
|
/// Add a new request to the queue and return a stream of InferStreamResponse
|
||||||
#[instrument(skip(self))]
|
#[instrument(skip_all)]
|
||||||
pub(crate) async fn generate_stream(
|
pub(crate) async fn generate_stream(
|
||||||
&self,
|
&self,
|
||||||
request: GenerateRequest,
|
request: GenerateRequest,
|
||||||
@ -133,7 +133,7 @@ impl Infer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Add a new request to the queue and return a InferResponse
|
/// Add a new request to the queue and return a InferResponse
|
||||||
#[instrument(skip(self))]
|
#[instrument(skip_all)]
|
||||||
pub(crate) async fn generate(
|
pub(crate) async fn generate(
|
||||||
&self,
|
&self,
|
||||||
request: GenerateRequest,
|
request: GenerateRequest,
|
||||||
@ -214,7 +214,7 @@ impl Infer {
|
|||||||
}
|
}
|
||||||
/// Add best_of new requests to the queue and return a InferResponse of the sequence with
|
/// Add best_of new requests to the queue and return a InferResponse of the sequence with
|
||||||
/// the highest log probability per token
|
/// the highest log probability per token
|
||||||
#[instrument(skip(self))]
|
#[instrument(skip(self, request))]
|
||||||
pub(crate) async fn generate_best_of(
|
pub(crate) async fn generate_best_of(
|
||||||
&self,
|
&self,
|
||||||
request: GenerateRequest,
|
request: GenerateRequest,
|
||||||
|
@ -69,7 +69,7 @@ impl Validation {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[instrument(skip_all)]
|
#[instrument(skip(self, inputs))]
|
||||||
async fn validate_input(
|
async fn validate_input(
|
||||||
&self,
|
&self,
|
||||||
inputs: String,
|
inputs: String,
|
||||||
|
Loading…
Reference in New Issue
Block a user