@@ -62,6 +62,7 @@ def __init__(
6262 include_traces : bool = True ,
6363 include_config : bool = True ,
6464 include_eval : bool = True ,
65+ include_task : bool = False ,
6566 validate_on_completion : bool = True ,
6667 ):
6768 """Initialize the result logger.
@@ -70,12 +71,15 @@ def __init__(
7071 include_traces: If True, include execution traces in logged results
7172 include_config: If True, include configuration in logged results
7273 include_eval: If True, include evaluation results in logged results
74+ include_task: If True, include task data (query, metadata, protocol)
75+ in logged results
7376 validate_on_completion: If True, validate all iterations were logged at end
7477 """
7578 super ().__init__ ()
7679 self .include_traces = include_traces
7780 self .include_config = include_config
7881 self .include_eval = include_eval
82+ self .include_task = include_task
7983 self .validate_on_completion = validate_on_completion
8084
8185 # Tracking for validation
@@ -173,6 +177,9 @@ def _filter_report(self, report: Dict) -> Dict:
173177 if self .include_eval and "eval" in report :
174178 filtered ["eval" ] = report ["eval" ]
175179
180+ if self .include_task and "task" in report :
181+ filtered ["task" ] = report ["task" ]
182+
176183 return filtered
177184
178185 def _report_validation_errors (self ) -> None :
@@ -306,6 +313,7 @@ def __init__(
306313 include_traces : bool = True ,
307314 include_config : bool = True ,
308315 include_eval : bool = True ,
316+ include_task : bool = False ,
309317 validate_on_completion : bool = True ,
310318 ):
311319 """Initialize the file logger.
@@ -322,12 +330,15 @@ def __init__(
322330 include_traces: If True, include execution traces in logged results
323331 include_config: If True, include configuration in logged results
324332 include_eval: If True, include evaluation results in logged results
333+ include_task: If True, include task data (query, metadata, protocol)
334+ in logged results
325335 validate_on_completion: If True, validate all iterations were logged
326336 """
327337 super ().__init__ (
328338 include_traces = include_traces ,
329339 include_config = include_config ,
330340 include_eval = include_eval ,
341+ include_task = include_task ,
331342 validate_on_completion = validate_on_completion ,
332343 )
333344
@@ -518,6 +529,7 @@ def _write_metadata(self) -> None:
518529 "include_traces" : self .include_traces ,
519530 "include_config" : self .include_config ,
520531 "include_eval" : self .include_eval ,
532+ "include_task" : self .include_task ,
521533 "validation_enabled" : self .validate_on_completion ,
522534 }
523535
0 commit comments