File tree Expand file tree Collapse file tree 1 file changed +6
-14
lines changed
examples/mlx_metal_kernel_opt Expand file tree Collapse file tree 1 file changed +6
-14
lines changed Original file line number Diff line number Diff line change 55import os
66import sys
77
8- sys .path .append ("/Users/asankhaya/Documents/GitHub/openevolve/examples/mlx_metal_kernel_opt" )
8+ # Add current directory to path for local imports
9+ sys .path .insert (0 , os .path .dirname (os .path .abspath (__file__ )))
910
1011from qwen3_benchmark_suite import Qwen3BenchmarkSuite , BenchmarkConfig
1112
@@ -41,17 +42,7 @@ def run_quick_test():
4142 ),
4243 ]
4344
44- # Change to mlx-lm directory
45- original_dir = os .getcwd ()
46- mlx_lm_dir = "/Users/asankhaya/Documents/GitHub/mlx-lm"
47-
48- if os .path .exists (mlx_lm_dir ):
49- os .chdir (mlx_lm_dir )
50- print (f"Changed to mlx-lm directory: { mlx_lm_dir } " )
51- else :
52- print (f"Error: mlx-lm directory not found at { mlx_lm_dir } " )
53- return
54-
45+ # Use mlx-lm as installed package (no need to change directories)
5546 try :
5647 benchmark_suite = Qwen3BenchmarkSuite ()
5748
@@ -105,8 +96,9 @@ def run_quick_test():
10596
10697 return results
10798
108- finally :
109- os .chdir (original_dir )
99+ except Exception as e :
100+ print (f"Error running benchmarks: { e } " )
101+ return None
110102
111103
112104if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments