@@ -360,6 +360,7 @@ def log_results( # noqa: D417
360360 is_correct : dict [str , bool ] | None ,
361361 optimized_line_profiler_results : dict [str , str ] | None ,
362362 metadata : dict [str , Any ] | None ,
363+ optimizations_post : dict [str , str ] | None = None ,
363364 ) -> None :
364365 """Log features to the database.
365366
@@ -372,6 +373,7 @@ def log_results( # noqa: D417
372373 - is_correct (Optional[Dict[str, bool]]): Whether the optimized code is correct.
373374 - optimized_line_profiler_results: line_profiler results for every candidate mapped to their optimization_id
374375 - metadata: contains the best optimization id
376+ - optimizations_post - dict mapping opt id to code str after postprocessing
375377
376378 """
377379 payload = {
@@ -383,6 +385,7 @@ def log_results( # noqa: D417
383385 "codeflash_version" : codeflash_version ,
384386 "optimized_line_profiler_results" : optimized_line_profiler_results ,
385387 "metadata" : metadata ,
388+ "optimizations_post" : optimizations_post ,
386389 }
387390 try :
388391 self .make_ai_service_request ("/log_features" , payload = payload , timeout = 5 )
0 commit comments