Open
Description
Add Logging and Error Handling for get_benchmark_final_target_code
Description
@DonggeLiu
While PR #905 addresses JSON syntax issues in crash.json
, the root cause of missing source_code
fields—such as silent failures in get_benchmark_final_target_code()
—remains unresolved. This issue focuses on adding logging and improving error handling to diagnose and mitigate such failures effectively.
Scope of Work
📝 Enhanced Logging
- Add logs to identify when
source_code
is missing and the reason behind it. - Log invalid
sample_id
formats (e.g., cases wheresample_id
cannot be split intobenchmark/sample
). - Capture errors related to missing source code files.
⚡ Improved Error Handling
- Ensure
get_benchmark_final_target_code()
handles malformed or emptysample_id
gracefully. - Return
null
explicitly instead of empty strings in JSON outputs to improve clarity. - Implement fallback mechanisms for missing or malformed data.
Why This Matters
✅ Improved Debuggability – Logs will help identify whether source_code
is missing due to experiment failures or internal code issues.
✅ Increased Robustness – Ensures graceful handling of errors instead of silent failures, reducing invalid JSON outputs.
Metadata
Metadata
Assignees
Labels
No labels