Skip to content

Commit

Permalink
Merge pull request #51 from swisstopo/fix/duplicate_column_in_documen…
Browse files Browse the repository at this point in the history
…t_level_metrics

Fix duplicate column 'document_name' in document_level_metrics table.
  • Loading branch information
redur authored May 28, 2024
2 parents d26fbf7 + 015772f commit 5b4c405
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/stratigraphy/benchmark/score.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,9 @@ def evaluate_borehole_extraction(predictions: dict, number_of_truth_values: dict
layer_metrics, layer_document_level_metrics = evaluate_layer_extraction(predictions, number_of_truth_values)
coordinate_metrics, coordinate_document_level_metrics = evaluate_metadata(predictions)
metrics = {**layer_metrics, **coordinate_metrics}
document_level_metrics = pd.concat([layer_document_level_metrics, coordinate_document_level_metrics], axis=1)
document_level_metrics = pd.merge(
layer_document_level_metrics, coordinate_document_level_metrics, on="document_name"
)
return metrics, document_level_metrics


Expand Down

1 comment on commit 5b4c405

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/stratigraphy
   __init__.py8188%11
   extract.py2112110%3–507
   get_files.py21210%3–48
   line_detection.py26260%3–76
   main.py91910%3–232
src/stratigraphy/util
   coordinate_extraction.py1283176%30, 50, 54, 58–66, 143, 163, 235–241, 250–252, 268–282
   dataclasses.py32391%37–39
   depthcolumn.py2066767%26, 30, 51, 57, 60–61, 85, 88, 95, 102, 110–111, 121, 138–154, 199, 238, 254–262, 274, 279, 286, 310, 314, 343, 364, 367–378, 393–394, 439–481
   depthcolumnentry.py20480%12, 15, 27, 34
   description_block_splitter.py70297%24, 139
   draw.py73730%3–225
   duplicate_detection.py32320%3–81
   find_depth_columns.py89693%39–40, 68, 80, 173–174
   find_description.py632856%27–35, 50–63, 79–95, 172–175
   geometric_line_utilities.py87298%83, 133
   interval.py1075251%25–28, 32–35, 40, 45, 48, 100–146, 167, 172–188
   language_detection.py18180%3–43
   layer_identifier_column.py91910%3–227
   line.py492647%25, 42, 51, 65–95, 98
   linesquadtree.py46198%76
   plot_utils.py44440%3–121
   predictions.py1871870%3–385
   textblock.py74889%27, 51, 63, 75, 98, 119, 127, 155
   util.py402245%15–18, 22, 26, 40–47, 61–63, 87–88, 100–105
TOTAL1813104742% 

Tests Skipped Failures Errors Time
58 0 💤 0 ❌ 0 🔥 0.619s ⏱️

Please sign in to comment.