File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 2
2
import yaml
3
3
import boto3
4
4
5
+ from tabrepo .benchmark .models .model_register import infer_model_cls
6
+
7
+
5
8
def yaml_to_methods (methods_file : str ) -> list :
6
9
with open (methods_file , 'r' ) as file :
7
10
methods_config = yaml .safe_load (file )
@@ -15,7 +18,8 @@ def parse_method(method_config: dict, context=None):
15
18
# Convert string class names to actual class references
16
19
# This assumes the classes are already defined or imported in evaluate.py
17
20
if 'model_cls' in method_config :
18
- method_config ['model_cls' ] = eval (method_config ['model_cls' ], context )
21
+ method_config ["model_cls" ] = infer_model_cls (method_config ["model_cls" ])
22
+ # method_config['model_cls'] = eval(method_config['model_cls'], context)
19
23
if 'method_cls' in method_config :
20
24
method_config ['method_cls' ] = eval (method_config ['method_cls' ], context )
21
25
You can’t perform that action at this time.
0 commit comments