Skip to content

Commit 7a97fd6

Browse files
authored
chore: Small formatting change in cli.py to avoid long line (#40)
Signed-off-by: Nick Hill <[email protected]>
1 parent 50fc27d commit 7a97fd6

File tree

1 file changed

+2
-1
lines changed
  • server/text_generation_server

1 file changed

+2
-1
lines changed

server/text_generation_server/cli.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,8 @@ def convert_to_safetensors(
180180

181181
if local_pt_index_file:
182182
local_pt_index_file = Path(local_pt_index_file)
183-
local_st_index_file = local_pt_index_file.parent / f"{local_pt_index_file.stem.removeprefix('pytorch_').rstrip('.bin.index')}.safetensors.index.json"
183+
st_prefix = local_pt_index_file.stem.removeprefix('pytorch_').rstrip('.bin.index')
184+
local_st_index_file = local_pt_index_file.parent / f"{st_prefix}.safetensors.index.json"
184185

185186
if os.path.exists(local_st_index_file):
186187
print("Existing .safetensors.index.json file found, remove it first to reconvert")

0 commit comments

Comments
 (0)