errors.rs 726 Bytes
Newer Older
1
use std::path::PathBuf;
Nicolas Patry's avatar
Nicolas Patry committed
2
3
4
5
6
7
use thiserror::Error;

use text_generation_router::server;

#[derive(Debug, Error)]
pub enum TensorRtLlmBackendError {
8
9
10
11
12
13
    #[error("Provided engine folder {0} doesn't exist")]
    EngineFolderDoesntExists(PathBuf),
    #[error("Provided executorWorker binary path {0} doesn't exist")]
    ExecutorWorkerNotFound(PathBuf),
    #[error("TensorRT-LLM Runtime error: {0}")]
    Runtime(String),
Nicolas Patry's avatar
Nicolas Patry committed
14
15
16
17
18
19
20
21
22
    #[error("Tokenizer error: {0}")]
    Tokenizer(String),
    #[error("Argument validation error: {0}")]
    ArgumentValidation(String),
    #[error("WebServer error: {0}")]
    WebServer(#[from] server::WebServerError),
    #[error("Tokio runtime failed to start: {0}")]
    Tokio(#[from] std::io::Error),
}