confidence labels
This commit is contained in:
parent
2403accd06
commit
70feabe965
6 changed files with 194 additions and 61 deletions
|
|
@ -25,6 +25,7 @@ from repo_registry.core.models import (
|
|||
ReviewDecision,
|
||||
SearchResult,
|
||||
SourceReference,
|
||||
confidence_label,
|
||||
)
|
||||
from repo_registry.content_indexing.extractor import ContentChunkCandidate
|
||||
from repo_registry.candidate_graph.generator import CandidateAbilityDraft
|
||||
|
|
@ -401,6 +402,7 @@ class RegistryStore:
|
|||
confidence=row["confidence"],
|
||||
status=row["status"],
|
||||
source_refs=self._source_refs_from_json(row["source_refs"]),
|
||||
confidence_label=confidence_label(row["confidence"]),
|
||||
)
|
||||
)
|
||||
|
||||
|
|
@ -429,6 +431,7 @@ class RegistryStore:
|
|||
confidence=row["confidence"],
|
||||
status=row["status"],
|
||||
source_refs=self._source_refs_from_json(row["source_refs"]),
|
||||
confidence_label=confidence_label(row["confidence"]),
|
||||
features=features_by_capability.get(row["id"], []),
|
||||
evidence=evidence_by_capability.get(row["id"], []),
|
||||
)
|
||||
|
|
@ -442,6 +445,7 @@ class RegistryStore:
|
|||
confidence=row["confidence"],
|
||||
status=row["status"],
|
||||
source_refs=self._source_refs_from_json(row["source_refs"]),
|
||||
confidence_label=confidence_label(row["confidence"]),
|
||||
capabilities=capabilities_by_ability.get(row["id"], []),
|
||||
)
|
||||
for row in ability_rows
|
||||
|
|
@ -1119,6 +1123,7 @@ class RegistryStore:
|
|||
name=row["name"],
|
||||
description=row["description"],
|
||||
confidence=row["confidence"],
|
||||
confidence_label=confidence_label(row["confidence"]),
|
||||
)
|
||||
for row in rows
|
||||
]
|
||||
|
|
@ -1146,6 +1151,7 @@ class RegistryStore:
|
|||
name=row["name"],
|
||||
description=row["description"],
|
||||
confidence=row["confidence"],
|
||||
confidence_label=confidence_label(row["confidence"]),
|
||||
)
|
||||
for row in rows
|
||||
]
|
||||
|
|
@ -1555,6 +1561,7 @@ class RegistryStore:
|
|||
type=row["type"],
|
||||
location=row["location"],
|
||||
confidence=row["confidence"],
|
||||
confidence_label=confidence_label(row["confidence"]),
|
||||
source_refs=self._source_refs_from_json(row["source_refs"]),
|
||||
)
|
||||
)
|
||||
|
|
@ -1581,6 +1588,7 @@ class RegistryStore:
|
|||
inputs=json.loads(row["inputs"]),
|
||||
outputs=json.loads(row["outputs"]),
|
||||
confidence=row["confidence"],
|
||||
confidence_label=confidence_label(row["confidence"]),
|
||||
features=features_by_capability.get(row["id"], []),
|
||||
evidence=evidence_by_capability.get(row["id"], []),
|
||||
)
|
||||
|
|
@ -1592,6 +1600,7 @@ class RegistryStore:
|
|||
name=row["name"],
|
||||
description=row["description"],
|
||||
confidence=row["confidence"],
|
||||
confidence_label=confidence_label(row["confidence"]),
|
||||
capabilities=capabilities_by_ability.get(row["id"], []),
|
||||
)
|
||||
for row in ability_rows
|
||||
|
|
@ -1706,9 +1715,10 @@ class RegistryStore:
|
|||
repository_name=row["repository_name"],
|
||||
match_type="repository",
|
||||
match_name=row["repository_name"],
|
||||
confidence=1.0,
|
||||
confidence_label=confidence_label(1.0),
|
||||
match_description=row["description"] or "",
|
||||
matched_field=matched_field,
|
||||
confidence=1.0,
|
||||
)
|
||||
)
|
||||
for row in ability_rows:
|
||||
|
|
@ -1721,9 +1731,10 @@ class RegistryStore:
|
|||
repository_name=row["repository_name"],
|
||||
match_type="ability",
|
||||
match_name=row["ability_name"],
|
||||
confidence=row["confidence"],
|
||||
confidence_label=confidence_label(row["confidence"]),
|
||||
match_description=row["ability_description"],
|
||||
matched_field=matched_field,
|
||||
confidence=row["confidence"],
|
||||
ability_id=row["ability_id"],
|
||||
ability_name=row["ability_name"],
|
||||
)
|
||||
|
|
@ -1740,9 +1751,10 @@ class RegistryStore:
|
|||
repository_name=row["repository_name"],
|
||||
match_type="capability",
|
||||
match_name=row["capability_name"],
|
||||
confidence=row["confidence"],
|
||||
confidence_label=confidence_label(row["confidence"]),
|
||||
match_description=row["capability_description"],
|
||||
matched_field=matched_field,
|
||||
confidence=row["confidence"],
|
||||
ability_id=row["ability_id"],
|
||||
ability_name=row["ability_name"],
|
||||
capability_id=row["capability_id"],
|
||||
|
|
@ -1764,9 +1776,10 @@ class RegistryStore:
|
|||
repository_name=row["repository_name"],
|
||||
match_type="feature",
|
||||
match_name=row["feature_name"],
|
||||
confidence=row["confidence"],
|
||||
confidence_label=confidence_label(row["confidence"]),
|
||||
match_description=row["feature_type"],
|
||||
matched_field=matched_field,
|
||||
confidence=row["confidence"],
|
||||
ability_id=row["ability_id"],
|
||||
ability_name=row["ability_name"],
|
||||
capability_id=row["capability_id"],
|
||||
|
|
@ -1789,9 +1802,12 @@ class RegistryStore:
|
|||
repository_name=row["repository_name"],
|
||||
match_type="evidence",
|
||||
match_name=row["reference"],
|
||||
confidence=self._evidence_confidence(row["strength"]),
|
||||
confidence_label=confidence_label(
|
||||
self._evidence_confidence(row["strength"])
|
||||
),
|
||||
match_description=row["evidence_type"],
|
||||
matched_field=matched_field,
|
||||
confidence=self._evidence_confidence(row["strength"]),
|
||||
ability_id=row["ability_id"],
|
||||
ability_name=row["ability_name"],
|
||||
capability_id=row["capability_id"],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue