Skip to content

Commit

Permalink
fix(xtask): 目录需要可读的名字
Browse files Browse the repository at this point in the history
Signed-off-by: YdrMaster <[email protected]>
  • Loading branch information
YdrMaster committed Jul 6, 2024
1 parent f917ff5 commit 5477330
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions xtask/src/cast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,14 @@ impl CastArgs {

let target = self.target.map(PathBuf::from).unwrap_or_else(|| {
model_dir.parent().unwrap().join(format!(
"{}_{ty:?}",
model_dir.file_name().unwrap().to_str().unwrap()
"{}_{}",
model_dir.file_name().unwrap().to_str().unwrap(),
match ty {
F16 => "f16",
F32 => "f32",
BF16 => "bf16",
_ => unreachable!(),
}
))
});
fs::create_dir_all(&target).unwrap();
Expand Down

0 comments on commit 5477330

Please sign in to comment.