Skip to content

Add Logging and Error Handling for get_benchmark_final_target_code #908

Open
@Ekam219

Description

@Ekam219

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 where sample_id cannot be split into benchmark/sample).
  • Capture errors related to missing source code files.

Improved Error Handling

  • Ensure get_benchmark_final_target_code() handles malformed or empty sample_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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions