FuryAssassin commited on
Commit
c1c7f41
·
verified ·
1 Parent(s): a520dd6

Upload evaluation/benchmarks/code_generation/eval.py with huggingface_hub

Browse files
evaluation/benchmarks/code_generation/eval.py CHANGED
@@ -11,9 +11,8 @@ def main():
11
  parser.add_argument("model_path", type=str, help="Path to model checkpoint")
12
  args = parser.parse_args()
13
 
14
- # Accept either a directory or a model file path for this benchmark
15
- if not (os.path.isfile(args.model_path) or os.path.isdir(args.model_path)):
16
- print(f"Error: Path not found at '{args.model_path}'", file=sys.stderr)
17
  sys.exit(1)
18
 
19
  checkpoint_name = os.path.basename(os.path.normpath(args.model_path))
 
11
  parser.add_argument("model_path", type=str, help="Path to model checkpoint")
12
  args = parser.parse_args()
13
 
14
+ if not os.path.isfile(args.model_path):
15
+ print(f"Error: Directory not found at '{args.model_path}'", file=sys.stderr)
 
16
  sys.exit(1)
17
 
18
  checkpoint_name = os.path.basename(os.path.normpath(args.model_path))