make sure executor_worker is provided
This commit is contained in:
parent
97723d1458
commit
6300bab8b4
|
@ -103,13 +103,13 @@ impl TensorRtLlmBackend {
|
|||
pub fn new<P: AsRef<Path> + Send + 'static, PP: AsRef<Path> + Send + 'static>(
|
||||
tokenizer: Tokenizer,
|
||||
engine_folder: P,
|
||||
_executor_worker_path: Option<PP>,
|
||||
executor_worker_path: PP,
|
||||
) -> Result<Self, TensorRtLlmBackendError> {
|
||||
Ok(TensorRtLlmBackend {
|
||||
tokenizer: Arc::new(tokenizer),
|
||||
backend: Arc::new(RwLock::new(create_tensorrt_llm_backend(
|
||||
engine_folder.as_ref().to_str().unwrap(),
|
||||
"",
|
||||
executor_worker_path.as_ref().to_str().unwrap(),
|
||||
))),
|
||||
})
|
||||
}
|
||||
|
|
|
@ -56,12 +56,8 @@ struct Args {
|
|||
max_client_batch_size: usize,
|
||||
#[clap(long, env)]
|
||||
auth_token: Option<String>,
|
||||
#[clap(
|
||||
long,
|
||||
env,
|
||||
help = "Path to the TensorRT-LLM Orchestrator Worker binary"
|
||||
)]
|
||||
executor_worker: Option<PathBuf>,
|
||||
#[clap(long, env, help = "Path to the TensorRT-LLM Orchestrator worker")]
|
||||
executor_worker: PathBuf,
|
||||
}
|
||||
|
||||
#[tokio::main]
|
||||
|
@ -123,13 +119,11 @@ async fn main() -> Result<(), TensorRtLlmBackendError> {
|
|||
}
|
||||
}
|
||||
|
||||
if let Some(ref executor_worker) = executor_worker {
|
||||
if !executor_worker.exists() {
|
||||
return Err(TensorRtLlmBackendError::ArgumentValidation(format!(
|
||||
"`executor_work` specified path doesn't exists: {}",
|
||||
executor_worker.display()
|
||||
)));
|
||||
}
|
||||
if !executor_worker.exists() {
|
||||
return Err(TensorRtLlmBackendError::ArgumentValidation(format!(
|
||||
"`executor_work` specified path doesn't exists: {}",
|
||||
executor_worker.display()
|
||||
)));
|
||||
}
|
||||
|
||||
// Run server
|
||||
|
|
Loading…
Reference in New Issue