Closed sweep-nightly[bot] closed 10 months ago
tools/end2end/eval_end2end.py
⋯
Sandbox logs for
tools/end2end/eval_end2end.py
⋯
Sandbox logs for
tools/end2end/eval_end2end.py
⋯
Sandbox logs for
tools/end2end/eval_end2end.py
⋯
Sandbox logs for
Description
This PR refactors the
e2e_eval
function intools/end2end/eval_end2end.py
to improve its modularity. The function was previously quite large and performed multiple tasks, making it difficult to understand and maintain. The changes in this PR break down thee2e_eval
function into smaller, more manageable functions, each performing a specific task.Summary of Changes
e2e_eval
function that calculates the Intersection over Union (IoU) into a new function namedcalculate_iou
.e2e_eval
function that calculates the edit distance into a new function namedcalculate_edit_distance
.e2e_eval
function that calculates the precision, recall, and f-measure into a new function namedcalculate_metrics
.e2e_eval
function that calculates the average edit distance per image and per field into a new function namedcalculate_avg_edit_distance
.These changes make the
e2e_eval
function easier to understand and maintain, and allow for better testing and reuse of the individual tasks performed by the function.Fixes #1.
🎉 Latest improvements to Sweep:
rope
to refactor Python! Check out Large Language Models are Bad at Refactoring Code.💡 To get Sweep to edit this pull request, you can: