model-conversion : make causal-verify-logits fails with model names containing "." (#16215)
Signed-off-by: Jie Fu <jiefu@tencent.com>
This commit is contained in:
parent
152729f884
commit
63b54c81a6
|
|
@ -48,7 +48,7 @@ def main():
|
||||||
print(f"Error: Model file not found: {model_path}")
|
print(f"Error: Model file not found: {model_path}")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
model_name = os.path.splitext(os.path.basename(model_path))[0]
|
model_name = os.path.basename(model_path)
|
||||||
data_dir = Path("data")
|
data_dir = Path("data")
|
||||||
|
|
||||||
pytorch_file = data_dir / f"pytorch-{model_name}.bin"
|
pytorch_file = data_dir / f"pytorch-{model_name}.bin"
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ def main():
|
||||||
parser.add_argument('-m', '--model-path', required=True, help='Path to the model directory')
|
parser.add_argument('-m', '--model-path', required=True, help='Path to the model directory')
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
model_name = os.path.splitext(os.path.basename(args.model_path))[0]
|
model_name = os.path.basename(args.model_path)
|
||||||
data_dir = Path("data")
|
data_dir = Path("data")
|
||||||
|
|
||||||
pytorch_file = data_dir / f"pytorch-{model_name}.bin"
|
pytorch_file = data_dir / f"pytorch-{model_name}.bin"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue