@@ -36,6 +36,14 @@ def setup_parser(subparser):
3636 index_parser = sp .add_parser (
3737 "index" , help = results_index .__doc__ , description = results_index .__doc__
3838 )
39+ index_parser .add_argument (
40+ "-v" ,
41+ "--all-vars" ,
42+ dest = "all_vars" ,
43+ action = "store_true" ,
44+ help = "print all variable names" ,
45+ required = False ,
46+ )
3947 index_parser .add_argument ("-f" , "--file" , help = "path of results file" )
4048
4149 report_parser = sp .add_parser (
@@ -231,10 +239,15 @@ def _print_attr_dict(attr_dict: dict, n_indent=0):
231239def results_index (args ):
232240 """List attributes in results including FOMs and template variables"""
233241 results_dict = _load_results (args )
234- result_index = ramble .reports .generate_result_index (results_dict )
242+ filtered_experiments = ramble .reports .filter_exp_results (results_dict ["experiments" ])
243+ result_index = ramble .reports .generate_result_index (
244+ filtered_experiments , all_vars = args .all_vars
245+ )
235246 for obj_name , obj_dict in result_index .items ():
236247 if obj_dict :
237248 color .cprint (rucolor .title_color (f'{ obj_name .replace ("_" , " " ).title ()} :' ))
249+ if obj_name == "All Variables" and not args .all_vars :
250+ continue
238251 _print_attr_dict (obj_dict , n_indent = 4 )
239252
240253
@@ -250,8 +263,8 @@ def results_report(args):
250263 if args .workspace :
251264 ws_name = str (args .workspace )
252265
253- results_df = ramble .reports .prepare_data (results_dict , args . where )
254- ramble .reports .make_report (results_df , ws_name , args )
266+ filtered_experiments = ramble .reports .filter_exp_results (results_dict [ "experiments" ] )
267+ ramble .reports .make_report (filtered_experiments , ws_name , args )
255268
256269
257270def results (parser , args ):
0 commit comments