|
|
@@ -1,5 +1,5 @@
|
|
|
pub use crate::pre_serve::{
|
|
|
- BeforeServeTable, DistributedBackend, ModsTable, OnFailure, PreServeCommand,
|
|
|
+ BeforeServeTable, DistributedBackend, ModsTable, OnFailure, PreServeCommand, RecipeArgs,
|
|
|
};
|
|
|
use anyhow::{Context, Result};
|
|
|
use serde::Deserialize;
|
|
|
@@ -107,7 +107,7 @@ pub struct Recipe {
|
|
|
#[serde(default = "default_tensor_parallel_size")]
|
|
|
pub tensor_parallel_size: u32,
|
|
|
#[serde(default)]
|
|
|
- pub args: Vec<String>,
|
|
|
+ pub args: RecipeArgs,
|
|
|
#[serde(default)]
|
|
|
pub env: HashMap<String, String>,
|
|
|
#[serde(default)]
|
|
|
@@ -305,7 +305,7 @@ mod tests {
|
|
|
assert_eq!(recipe.model, "test/model");
|
|
|
assert_eq!(recipe.engine, "vllm");
|
|
|
assert_eq!(recipe.port, 30000);
|
|
|
- assert!(recipe.args.is_empty());
|
|
|
+ assert!(recipe.args.to_vec().is_empty());
|
|
|
assert!(recipe.env.is_empty());
|
|
|
assert_eq!(recipe.distributed_backend, None);
|
|
|
assert_eq!(recipe.tensor_parallel_size, 1);
|
|
|
@@ -337,7 +337,7 @@ OTHER = "123"
|
|
|
assert_eq!(recipe.pipeline_parallel_size, Some(2));
|
|
|
assert_eq!(recipe.distributed_backend, Some(DistributedBackend::Ray));
|
|
|
assert_eq!(recipe.cluster, Some("my-cluster".to_string()));
|
|
|
- assert_eq!(recipe.args, vec!["--arg1", "val1", "--arg2"]);
|
|
|
+ assert_eq!(recipe.args.to_vec(), vec!["--arg1", "val1", "--arg2"]);
|
|
|
assert_eq!(recipe.env.get("KEY").unwrap(), "value");
|
|
|
assert_eq!(recipe.env.get("OTHER").unwrap(), "123");
|
|
|
}
|