We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa93df6 commit 67d3f19Copy full SHA for 67d3f19
codeflash/benchmarking/instrument_codeflash_trace.py
@@ -98,12 +98,12 @@ def instrument_codeflash_trace_decorator(
98
"""Instrument __init__ function with codeflash_trace decorator if it's in a class."""
99
# Instrument fto class
100
original_code = function_to_optimize.file_path.read_text(encoding="utf-8")
101
-
102
- # Modify the code
103
- modified_code = isort.code(add_codeflash_decorator_to_code(
+ new_code = add_codeflash_decorator_to_code(
104
original_code,
105
function_to_optimize
106
- ))
+ )
+ # Modify the code
+ modified_code = isort.code(code=new_code, float_to_top=True)
107
108
# Write the modified code back to the file
109
function_to_optimize.file_path.write_text(modified_code, encoding="utf-8")
0 commit comments