|
@@ -114,8 +114,7 @@ pub struct Recipe {
|
|
|
pub cluster: Option<String>,
|
|
pub cluster: Option<String>,
|
|
|
#[serde(default)]
|
|
#[serde(default)]
|
|
|
pub entrypoint: Vec<String>,
|
|
pub entrypoint: Vec<String>,
|
|
|
- #[serde(default)]
|
|
|
|
|
- pub distributed_backend: DistributedBackend,
|
|
|
|
|
|
|
+ pub distributed_backend: Option<DistributedBackend>,
|
|
|
/// Shared memory size for the container (e.g. "64gb"). Omitted when empty.
|
|
/// Shared memory size for the container (e.g. "64gb"). Omitted when empty.
|
|
|
#[serde(default = "default_shm_size")]
|
|
#[serde(default = "default_shm_size")]
|
|
|
pub shm_size: String,
|
|
pub shm_size: String,
|
|
@@ -308,7 +307,7 @@ mod tests {
|
|
|
assert_eq!(recipe.port, 30000);
|
|
assert_eq!(recipe.port, 30000);
|
|
|
assert!(recipe.args.is_empty());
|
|
assert!(recipe.args.is_empty());
|
|
|
assert!(recipe.env.is_empty());
|
|
assert!(recipe.env.is_empty());
|
|
|
- assert_eq!(recipe.distributed_backend, DistributedBackend::None_);
|
|
|
|
|
|
|
+ assert_eq!(recipe.distributed_backend, None);
|
|
|
assert_eq!(recipe.tensor_parallel_size, 1);
|
|
assert_eq!(recipe.tensor_parallel_size, 1);
|
|
|
}
|
|
}
|
|
|
#[test]
|
|
#[test]
|
|
@@ -336,7 +335,7 @@ OTHER = "123"
|
|
|
assert_eq!(recipe.port, 30000);
|
|
assert_eq!(recipe.port, 30000);
|
|
|
assert_eq!(recipe.required_nodes, Some(4));
|
|
assert_eq!(recipe.required_nodes, Some(4));
|
|
|
assert_eq!(recipe.pipeline_parallel_size, Some(2));
|
|
assert_eq!(recipe.pipeline_parallel_size, Some(2));
|
|
|
- assert_eq!(recipe.distributed_backend, DistributedBackend::Ray);
|
|
|
|
|
|
|
+ assert_eq!(recipe.distributed_backend, Some(DistributedBackend::Ray));
|
|
|
assert_eq!(recipe.cluster, Some("my-cluster".to_string()));
|
|
assert_eq!(recipe.cluster, Some("my-cluster".to_string()));
|
|
|
assert_eq!(recipe.args, vec!["--arg1", "val1", "--arg2"]);
|
|
assert_eq!(recipe.args, vec!["--arg1", "val1", "--arg2"]);
|
|
|
assert_eq!(recipe.env.get("KEY").unwrap(), "value");
|
|
assert_eq!(recipe.env.get("KEY").unwrap(), "value");
|
|
@@ -482,7 +481,7 @@ ib_disable = 0
|
|
|
#[test]
|
|
#[test]
|
|
|
fn test_default_distributed_backend_is_none() {
|
|
fn test_default_distributed_backend_is_none() {
|
|
|
let recipe: Recipe = toml::from_str("name = \"x\"\nmodel = \"m\"").unwrap();
|
|
let recipe: Recipe = toml::from_str("name = \"x\"\nmodel = \"m\"").unwrap();
|
|
|
- assert_eq!(recipe.distributed_backend, DistributedBackend::None_);
|
|
|
|
|
|
|
+ assert_eq!(recipe.distributed_backend, None);
|
|
|
}
|
|
}
|
|
|
#[test]
|
|
#[test]
|
|
|
fn default_config_dir_appends_sm121_launcher() {
|
|
fn default_config_dir_appends_sm121_launcher() {
|