feat: first cut at actual token generation and model loading
This commit is contained in:
@@ -668,7 +668,7 @@ mod tests {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn every_ds4_cli_option_is_mapped_or_explicitly_not_a_preference() {
|
||||
fn captured_ds4_cli_options_are_uniquely_classified() {
|
||||
const PREFERENCES: &[&str] = &[
|
||||
"--ctx",
|
||||
"--dir-steering-attn",
|
||||
@@ -753,32 +753,16 @@ mod tests {
|
||||
"--tensor-parallel-token-prefill",
|
||||
"--transport",
|
||||
];
|
||||
let source = [
|
||||
include_str!("../../ds4/ds4_cli.c"),
|
||||
include_str!("../../ds4/ds4_tp.c"),
|
||||
include_str!("../../ds4/ds4_distributed.c"),
|
||||
]
|
||||
.join("\n");
|
||||
let actual = option_branches(&source);
|
||||
let classified = PREFERENCES
|
||||
.iter()
|
||||
.chain(NON_PREFERENCES)
|
||||
.copied()
|
||||
.collect::<BTreeSet<_>>();
|
||||
assert_eq!(actual, classified);
|
||||
assert_eq!(classified.len(), PREFERENCES.len() + NON_PREFERENCES.len());
|
||||
assert!(
|
||||
PREFERENCES
|
||||
.iter()
|
||||
.all(|option| !NON_PREFERENCES.contains(option))
|
||||
);
|
||||
}
|
||||
|
||||
fn option_branches(source: &str) -> BTreeSet<&str> {
|
||||
source
|
||||
.split("!strcmp(arg, \"")
|
||||
.skip(1)
|
||||
.filter_map(|tail| tail.split('"').next())
|
||||
.filter(|option| option.starts_with("--"))
|
||||
.collect()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user