@@ -142,8 +142,6 @@ def convert(obj):
142142 Returns:
143143 A serializable version of the input object where dataclasses are converted to dictionaries
144144 """
145- from triton .language .core import dtype
146-
147145 # 1. primitives that JSON already supports -------------------------------
148146 if obj is None or isinstance (obj , (bool , int , str )):
149147 return obj
@@ -178,11 +176,6 @@ def convert(obj):
178176 return convert (
179177 asdict (obj )
180178 ) # Convert dataclass to dict and then process that dict
181-
182- # 4. Common Triton constexpr objects
183- if isinstance (obj , dtype ):
184- return f"triton.language.core.dtype('{ str (obj )} ')"
185-
186179 log .warning (f"Unknown type: { type (obj )} " )
187180 return str (obj ) # Return primitive types as-is
188181
@@ -378,18 +371,18 @@ def extract_file_content(trace_data: Dict[str, Any], metadata_group: Dict[str, s
378371 # Check file size before reading to avoid memory issues
379372 file_size = os .path .getsize (file_path )
380373 if file_size > MAX_FILE_SIZE :
381- trace_data ["file_content" ][ir_filename ] = (
382- f"<file too large: { file_size } bytes>"
383- )
374+ trace_data ["file_content" ][
375+ ir_filename
376+ ] = f"<file too large: { file_size } bytes>"
384377 continue
385378
386379 with open (file_path , "r" ) as f :
387380 trace_data ["file_content" ][ir_filename ] = f .read ()
388381 except (UnicodeDecodeError , OSError ) as e :
389382 # add more specific error type
390- trace_data ["file_content" ][ir_filename ] = (
391- f"<error reading file: { str ( e ) } >"
392- )
383+ trace_data ["file_content" ][
384+ ir_filename
385+ ] = f"<error reading file: { str ( e ) } >"
393386 log .debug (f"Error reading file { file_path } : { e } " )
394387
395388
0 commit comments