Skip to content

Commit

Permalink
added confidace score in metadata (#826)
Browse files Browse the repository at this point in the history
  • Loading branch information
vishnuszipstack authored Nov 13, 2024
1 parent b44c771 commit 6a64d2b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions tools/structure/src/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,5 @@ class SettingsKeys:
METADATA = "metadata"
EPILOGUE = "epilogue"
HIGHLIGHT_DATA = "highlight_data"
CONFIDENCE_DATA = "confidence_data"
EXECUTION_RUN_DATA_FOLDER = "EXECUTION_RUN_DATA_FOLDER"
8 changes: 7 additions & 1 deletion tools/structure/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,16 @@ def run(
epilogue = metadata.pop(SettingsKeys.EPILOGUE, None)
if epilogue:
try:
from helper import transform_dict # type: ignore [attr-defined]
from helper import ( # type: ignore [attr-defined]
get_confidence_data,
transform_dict,
)

highlight_data = transform_dict(epilogue, tool_data_dir)
metadata[SettingsKeys.HIGHLIGHT_DATA] = highlight_data
metadata[SettingsKeys.CONFIDENCE_DATA] = get_confidence_data(
epilogue, tool_data_dir
)
except ImportError:
self.stream_log(
f"Highlight metadata is not added. {PAID_FEATURE_MSG}",
Expand Down

0 comments on commit 6a64d2b

Please sign in to comment.