Skip to content

Commit e94c886

Browse files
committed
Fix os path
Signed-off-by: Flavia Beo <flavia.beo@ibm.com>
1 parent bf1e809 commit e94c886

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/generate_layers_metrics.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ def generate_layers_metrics(model_path, batch_size, seq_length, max_new_tokens):
390390
seq_length=seq_length, max_new_tokens=max_new_tokens,
391391
tokenizer=tokenizer)
392392

393-
with open(os.join(output_path,f"{model_path}-layer-output-stack-cpu.json"), 'w') as f:
393+
with open(os.path.join(output_path,f"{model_path}-layer-output-stack-cpu.json"), 'w') as f:
394394
json.dump(layer_stack_cpu, f)
395395

396396
global generate_iters
@@ -403,7 +403,7 @@ def generate_layers_metrics(model_path, batch_size, seq_length, max_new_tokens):
403403
seq_length=seq_length, max_new_tokens=max_new_tokens,
404404
tokenizer=tokenizer)
405405

406-
with open(os.join(output_path,f"{model_path}-layer-output-stack-gpu.json"), 'w') as f:
406+
with open(os.path.join(output_path,f"{model_path}-layer-output-stack-gpu.json"), 'w') as f:
407407
json.dump(layer_stack_cuda, f)
408408

409409
assert len(layer_stack_cuda.keys()) == len(layer_stack_cpu.keys())

0 commit comments

Comments
 (0)