|
|
@@ -34,7 +34,7 @@ pub struct Cluster {
|
|
|
#[derive(Clone, Deserialize)]
|
|
|
pub struct Config {
|
|
|
pub ssh_user: String,
|
|
|
- pub ssh_key_path: String,
|
|
|
+ pub ssh_key_path: std::path::PathBuf,
|
|
|
pub clusters: Vec<Cluster>,
|
|
|
#[serde(default)]
|
|
|
pub nccl: HashMap<String, NcclConfig>,
|
|
|
@@ -264,7 +264,7 @@ mod tests {
|
|
|
fn test_config() -> Config {
|
|
|
Config {
|
|
|
ssh_user: "u".to_string(),
|
|
|
- ssh_key_path: "/k".to_string(),
|
|
|
+ ssh_key_path: "/k".into(),
|
|
|
clusters: vec![test_cluster()],
|
|
|
nccl: HashMap::new(),
|
|
|
hf_cache_dir: None,
|
|
|
@@ -389,7 +389,7 @@ nodes = [
|
|
|
fn test_select_cluster_by_name() {
|
|
|
let mut config = Config {
|
|
|
ssh_user: "user".to_string(),
|
|
|
- ssh_key_path: "/path/to/key".to_string(),
|
|
|
+ ssh_key_path: "/path/to/key".into(),
|
|
|
clusters: vec![test_cluster()],
|
|
|
nccl: HashMap::new(),
|
|
|
hf_cache_dir: None,
|
|
|
@@ -407,7 +407,7 @@ nodes = [
|
|
|
fn test_select_cluster_auto() {
|
|
|
let mut config = Config {
|
|
|
ssh_user: "user".to_string(),
|
|
|
- ssh_key_path: "/path/to/key".to_string(),
|
|
|
+ ssh_key_path: "/path/to/key".into(),
|
|
|
clusters: vec![test_cluster()],
|
|
|
nccl: HashMap::new(),
|
|
|
hf_cache_dir: None,
|