CaCu training and scoring jobs on gold, MLflow versions with their reports
This commit is contained in:
+6
-4
@@ -257,12 +257,14 @@ def run_link(p: str, node: Link):
|
||||
torn = set(spread[(spread > 1).any(axis=1)].index) if facts else set()
|
||||
held = json.dumps(["records of this person disagree on birth date or sex"])
|
||||
columns = {f: {"data_type": "text", "nullable": True} for f in (HELD, *fields)}
|
||||
nodes.write(p, node.id, [
|
||||
linked = [
|
||||
{RECORD: r.unique_id, "person_id": r.cluster_id,
|
||||
HELD: held if r.cluster_id in torn else None,
|
||||
**{f: getattr(r, f) for f in fields}}
|
||||
for r in persons.itertuples()
|
||||
], columns) # fmt: skip
|
||||
] # fmt: skip
|
||||
nodes.write(p, node.id, linked, columns)
|
||||
nodes.stage("identity", p, node.id, linked, silver.columns("identity")) # silver.person
|
||||
|
||||
# One row per person, so random pairs are different people and Splink's u is honest.
|
||||
ids = [f for f in IDENTIFIERS if f in fields]
|
||||
@@ -376,5 +378,5 @@ def run(pipeline_id: str, pipeline: Pipeline, log: Callable[[str], None] = print
|
||||
RUNNERS[node.kind](pipeline_id, node)
|
||||
log(f"{node.id} ({node.kind}) done")
|
||||
if entities := sorted({n.entity for n in pipeline.nodes if n.kind == "target"}):
|
||||
silver.build(entities)
|
||||
log(f"silver: {', '.join(entities)}")
|
||||
silver.build(["silver+"]) # every entity (empty if never staged) and what derives
|
||||
log(f"silver and gold, from {', '.join(entities)}")
|
||||
|
||||
Reference in New Issue
Block a user