Datasets:
Append frozen local UIE candidate spans and local topic links without semantic attribute decisions
Browse files- supplements/20261025_buv_preperiod_uie_features/MANIFEST.json +86 -0
- supplements/20261025_buv_preperiod_uie_features/model_outputs.jsonl.gz +3 -0
- supplements/20261025_buv_preperiod_uie_features/processing/audit_uie_features.py +86 -0
- supplements/20261025_buv_preperiod_uie_features/processing/extract_preperiod_uie_features.py +223 -0
- supplements/20261025_buv_preperiod_uie_features/protocol.json +77 -0
- supplements/20261025_buv_preperiod_uie_features/record_feature_projection.jsonl.gz +3 -0
- supplements/20261025_buv_preperiod_uie_features/record_mapping.jsonl.gz +3 -0
- supplements/20261025_buv_preperiod_uie_features/replay_audit.json +92 -0
- supplements/20261025_buv_preperiod_uie_features/runtime.json +8 -0
- supplements/20261025_buv_preperiod_uie_features/summary.json +26 -0
- supplements/20261025_buv_preperiod_uie_features/topic_aspect_span_links.jsonl.gz +3 -0
- supplements/20261025_buv_preperiod_uie_features/topic_uie_feature_projection.jsonl.gz +3 -0
- supplements/20261025_buv_preperiod_uie_features/vendor_interface_control.json +111 -0
supplements/20261025_buv_preperiod_uie_features/MANIFEST.json
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"schema": "buv-uie-span-feature-manifest-v1",
|
| 3 |
+
"files": [
|
| 4 |
+
{
|
| 5 |
+
"path": "protocol.json",
|
| 6 |
+
"sha256": "d2c4e001e672183f61cf4c1e266c4093c2415ac03e21ee05fa9864548527d1d9",
|
| 7 |
+
"bytes": 2403
|
| 8 |
+
},
|
| 9 |
+
{
|
| 10 |
+
"path": "runtime.json",
|
| 11 |
+
"sha256": "f0146675ed618bfb1372297be2a0314fe803698c482bfa961b3aa651299e953e",
|
| 12 |
+
"bytes": 432
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"path": "vendor_interface_control.json",
|
| 16 |
+
"sha256": "29ac015efc881d0cd1a84a3725486a7c6c7db0d55841731daddef0fa5dc289a4",
|
| 17 |
+
"bytes": 2629
|
| 18 |
+
},
|
| 19 |
+
{
|
| 20 |
+
"path": "record_mapping.jsonl.gz",
|
| 21 |
+
"sha256": "9ed9f8b8500e7b91a83f126f60f41efcef7a43b0d2804ddeb9024b7ffeb9a2bf",
|
| 22 |
+
"bytes": 61669,
|
| 23 |
+
"compression": "gzip",
|
| 24 |
+
"decoded_sha256": "96254921ba59cf19589103afc794143ba7eaf2d9ef6f07f250f5e2310e539f96",
|
| 25 |
+
"decoded_bytes": 436711
|
| 26 |
+
},
|
| 27 |
+
{
|
| 28 |
+
"path": "model_outputs.jsonl.gz",
|
| 29 |
+
"sha256": "94ea99aa66854303915c8b70fdf0e48e2c92a1ca153a32caeb854b70e5440d9b",
|
| 30 |
+
"bytes": 83165,
|
| 31 |
+
"compression": "gzip",
|
| 32 |
+
"decoded_sha256": "a127eb5a9a58dc4cbf18b64bc696c3574b13f6f577c23198a544bf595ad8f694",
|
| 33 |
+
"decoded_bytes": 555807
|
| 34 |
+
},
|
| 35 |
+
{
|
| 36 |
+
"path": "summary.json",
|
| 37 |
+
"sha256": "8026d4a51c3b1445bb83a18777312fdd4d2d4ebabe6d13ebead7a69f39bcb8ec",
|
| 38 |
+
"bytes": 1335
|
| 39 |
+
},
|
| 40 |
+
{
|
| 41 |
+
"path": "record_feature_projection.jsonl.gz",
|
| 42 |
+
"sha256": "329d92628b5b60cfde4f89479ce19a2567553dd4e7854519c5167982ff5855e4",
|
| 43 |
+
"bytes": 63392,
|
| 44 |
+
"compression": "gzip",
|
| 45 |
+
"decoded_sha256": "1981d5531d9514fb0985383abb3477e95da2f017f1fc01f4bafc2ac91f11b227",
|
| 46 |
+
"decoded_bytes": 560005
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"path": "topic_uie_feature_projection.jsonl.gz",
|
| 50 |
+
"sha256": "1adaae1d04c584d70dc7d611e6663cfe6d4e394ba45e7a022b512d89c5f477af",
|
| 51 |
+
"bytes": 10773,
|
| 52 |
+
"compression": "gzip",
|
| 53 |
+
"decoded_sha256": "3ac885fa8a125a1fe06e77290dcb7aa21104df0d26847000a1df67a92375c3f4",
|
| 54 |
+
"decoded_bytes": 113950
|
| 55 |
+
},
|
| 56 |
+
{
|
| 57 |
+
"path": "topic_aspect_span_links.jsonl.gz",
|
| 58 |
+
"sha256": "8c0b1e74464d02dc1888fa6a0d718149f85b24a6a96adf7958a9a7f7fdd88daa",
|
| 59 |
+
"bytes": 522171,
|
| 60 |
+
"compression": "gzip",
|
| 61 |
+
"decoded_sha256": "816ca7222cf5ea0249dcf8b916478233590181c93993438f3f62536d3185d2b1",
|
| 62 |
+
"decoded_bytes": 2830932
|
| 63 |
+
},
|
| 64 |
+
{
|
| 65 |
+
"path": "replay_audit.json",
|
| 66 |
+
"sha256": "a0e89e37c74ca98cfeb9cf29a6c351f0690be6d9c67eb0b7df3d4b28c5f05602",
|
| 67 |
+
"bytes": 3760
|
| 68 |
+
},
|
| 69 |
+
{
|
| 70 |
+
"path": "processing/extract_preperiod_uie_features.py",
|
| 71 |
+
"sha256": "2586e35919a3fa49654f4bced0884749e7d325f5bf6cf0af8a3c12f80a65de40",
|
| 72 |
+
"bytes": 13268
|
| 73 |
+
},
|
| 74 |
+
{
|
| 75 |
+
"path": "processing/audit_uie_features.py",
|
| 76 |
+
"sha256": "296de6006942ef01f488ea8c4b1655a19a128d65b4a4fa43c74301b96ec4864e",
|
| 77 |
+
"bytes": 11243
|
| 78 |
+
}
|
| 79 |
+
],
|
| 80 |
+
"model_weights_duplicated": false,
|
| 81 |
+
"local_model_file_hashes_in_protocol": true,
|
| 82 |
+
"original_comment_captures_or_prior_hf_files_changed": false,
|
| 83 |
+
"formal_attribute_catalog_or_weights": false,
|
| 84 |
+
"processing_requires_repo_checkout_with_prior_fixed_sources": true,
|
| 85 |
+
"privacy": "Only already shared development comment text, native comment/video IDs and deidentified model spans; no native user IDs, browser state, cookies, credentials, private paths or platform requests."
|
| 86 |
+
}
|
supplements/20261025_buv_preperiod_uie_features/model_outputs.jsonl.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:94ea99aa66854303915c8b70fdf0e48e2c92a1ca153a32caeb854b70e5440d9b
|
| 3 |
+
size 83165
|
supplements/20261025_buv_preperiod_uie_features/processing/audit_uie_features.py
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Verify every UIE source span, preserve original IDs and attach local evidence."""
|
| 2 |
+
from pathlib import Path
|
| 3 |
+
from collections import Counter
|
| 4 |
+
import argparse,gzip,hashlib,io,json,math,shutil,sys
|
| 5 |
+
|
| 6 |
+
def main():
|
| 7 |
+
p=argparse.ArgumentParser();p.add_argument('--repo',type=Path,required=True);p.add_argument('--root',type=Path,required=True);p.add_argument('--features',type=Path,required=True);p.add_argument('--topic-root',type=Path,required=True);p.add_argument('--discovery-root',type=Path,required=True);a=p.parse_args();sys.path.insert(0,str(a.repo/'scripts'))
|
| 8 |
+
from build_buv_pilot_panel import immutable_reader
|
| 9 |
+
from prepare_preperiod_topics import digest
|
| 10 |
+
read,source_receipts=immutable_reader(a.repo);feature_audit=read('docs/sources/20261025/buv_preperiod_context_feature_audit.json');topic_audit=read('docs/sources/20261025/buv_preperiod_topic_evidence_audit.json');discovery_audit=read('docs/sources/20261025/buv_scoped_background_discovery_audit.json')
|
| 11 |
+
raw=a.root/'processing_output';protocol=json.loads((raw/'protocol.json').read_text());summary=json.loads((raw/'summary.json').read_text());assert summary['completed_unique_inputs']==summary['total_unique_inputs']==protocol['unique_nonempty_raw_inputs']
|
| 12 |
+
assert digest((a.repo/'scripts/extract_preperiod_uie_features.py').read_bytes())==protocol['script_sha256']
|
| 13 |
+
expected=next(f for f in feature_audit['hf_append_receipt']['files']if f['path'].endswith('/development_features.jsonl'));assert digest(a.features.read_bytes())==protocol['input_sha256']==expected['sha256']
|
| 14 |
+
def rows(path):return[json.loads(s)for s in path.read_text().splitlines()]
|
| 15 |
+
f={r['record_id']:r for r in rows(a.features)};mapping=rows(raw/'record_mapping.jsonl');outputs=rows(raw/'model_outputs.jsonl');by_input={r['input_key']:r for r in outputs};assert len(by_input)==len(outputs)==protocol['unique_nonempty_raw_inputs']
|
| 16 |
+
assert len(mapping)==len(f)==protocol['original_records']and len({r['record_id']for r in mapping})==len(mapping)and {r['record_id']for r in mapping}==set(f)
|
| 17 |
+
aspect_count=opinion_count=0
|
| 18 |
+
def span(text,s):
|
| 19 |
+
assert type(s['start'])is int and type(s['end'])is int and 0<=s['start']<s['end']<=len(text)
|
| 20 |
+
assert text[s['start']:s['end']]==s['text']and isinstance(s['probability'],(int,float))and math.isfinite(s['probability'])and 0<=s['probability']<=1
|
| 21 |
+
for output in outputs:
|
| 22 |
+
text=output['text'];assert digest(text.encode())==output['input_key']and output['formal_attribute_decision']is None and output['semantic_validity']=='unverified'
|
| 23 |
+
aspects=output['raw_model_output'].get('评价维度',[]);assert len(aspects)==len(output['events'])
|
| 24 |
+
for i,aspect in enumerate(aspects):
|
| 25 |
+
span(text,aspect);event=output['events'][i];assert event['aspect_index']==i and event['aspect']==aspect and event['aspect_validation']=={'source_span_valid':True,'reason_codes':[],'semantic_validity':'unverified'}and event['formal_attribute']is None and event['relation_semantic_validity']=='unverified'
|
| 26 |
+
opinions=aspect.get('relations',{}).get('观点词',[]);assert len(opinions)==len(event['opinion_validations'])
|
| 27 |
+
for j,opinion in enumerate(opinions):
|
| 28 |
+
span(text,opinion);assert event['opinion_validations'][j]=={'opinion_index':j,'source_span_valid':True,'reason_codes':[],'semantic_validity':'unverified'}
|
| 29 |
+
aspect_count+=1;opinion_count+=len(opinions)
|
| 30 |
+
assert aspect_count==summary['returned_aspect_candidates']and opinion_count==summary['returned_opinion_candidates']and summary['invalid_source_spans']==0
|
| 31 |
+
records=[];raw_inputs_seen=set()
|
| 32 |
+
for row in mapping:
|
| 33 |
+
original=f[row['record_id']]
|
| 34 |
+
for key in ['record_id','video_id','created_at_beijing','depth','is_source_author']:assert row[key]==original[key]
|
| 35 |
+
text=original['raw_text'];assert row['raw_text_sha256']==digest(text.encode())and row['formal_attribute_assignment']is None
|
| 36 |
+
if not text.strip():assert row['input_key']is None and row['state']=='not_called_empty_body';state='empty_body_not_inferred';aspects=opinions=None
|
| 37 |
+
else:
|
| 38 |
+
assert row['input_key']==digest(text.encode())and by_input[row['input_key']]['text']==text;raw_inputs_seen.add(row['input_key']);result=by_input[row['input_key']]['raw_model_output'];aspects=len(result.get('评价维度',[]));opinions=sum(len(x.get('relations',{}).get('观点词',[]))for x in result.get('评价维度',[]));state='returned_unverified_candidates'if aspects else'no_span_returned_at_fixed_decoder_setting'
|
| 39 |
+
records.append({**row,'state':state,'returned_aspect_candidates':aspects,'returned_opinion_candidates':opinions,'semantic_validity':'unverified','formal_attribute_assignment':None})
|
| 40 |
+
assert raw_inputs_seen==set(by_input)
|
| 41 |
+
def save(name,data):
|
| 42 |
+
p=raw/name;p.write_text(json.dumps(data,ensure_ascii=False,indent=2,allow_nan=False)+'\n')
|
| 43 |
+
def save_rows(name,data):(raw/name).write_text(''.join(json.dumps(r,ensure_ascii=False,allow_nan=False)+'\n'for r in data))
|
| 44 |
+
save_rows('record_feature_projection.jsonl',records)
|
| 45 |
+
role_views={}
|
| 46 |
+
for name,selected in [('all_roles',records),('non_source_author',[r for r in records if not r['is_source_author']])]:
|
| 47 |
+
role_views[name]={'records':len(selected),'empty_not_inferred':sum(r['state']=='empty_body_not_inferred'for r in selected),'records_with_returned_candidates':sum(r['state']=='returned_unverified_candidates'for r in selected),'records_without_returned_candidates':sum(r['state']=='no_span_returned_at_fixed_decoder_setting'for r in selected),'returned_aspect_event_candidates':sum(r['returned_aspect_candidates']or 0 for r in selected),'returned_opinion_event_candidates':sum(r['returned_opinion_candidates']or 0 for r in selected)}
|
| 48 |
+
input_receipts=[]
|
| 49 |
+
def pinned(root,relative,receipt):
|
| 50 |
+
fixed=next(r for r in receipt['files']if r['path']==receipt['prefix']+'/'+relative);data=(root/relative).read_bytes();assert digest(data)==fixed['sha256'];decoded=gzip.decompress(data)if relative.endswith('.gz')else data
|
| 51 |
+
if relative.endswith('.gz'):assert digest(decoded)==fixed['decoded_sha256']
|
| 52 |
+
input_receipts.append({'path':relative,'sha256':fixed['sha256'],'repository':receipt['repository'],'revision':receipt['supplement_revision']});return[json.loads(s)for s in decoded.decode().splitlines()]
|
| 53 |
+
docs=pinned(a.discovery_root,'all_roles_thread_discovery/unique_documents.jsonl',discovery_audit['hf_append_receipt']);units={u['unit_id']:u for d in docs for u in d['units']}
|
| 54 |
+
topics=[];links=[]
|
| 55 |
+
for view in ['all_roles','non_author']:
|
| 56 |
+
for run in ['2026','2027','2028','2026_repeat']:
|
| 57 |
+
source=pinned(a.topic_root,f'{view}/seed_{run}/topic_evidence.jsonl.gz',topic_audit['hf_append_receipt'])
|
| 58 |
+
for t in source:
|
| 59 |
+
own=set();event_links=0;cross_opinions=0
|
| 60 |
+
for uid in t['membership']['unit_ids']:
|
| 61 |
+
u=units[uid];cid=u['record_id'];record=f[cid];assert u['text']==record['raw_text'][u['char_start']:u['char_end']]
|
| 62 |
+
output=by_input[digest(record['raw_text'].encode())]
|
| 63 |
+
for i,aspect in enumerate(output['raw_model_output'].get('评价维度',[])):
|
| 64 |
+
if u['char_start']<=aspect['start']<aspect['end']<=u['char_end']:
|
| 65 |
+
own.add(cid);event_links+=1;ops=aspect.get('relations',{}).get('观点词',[]);same=sum(u['char_start']<=o['start']<o['end']<=u['char_end']for o in ops);cross_opinions+=len(ops)-same
|
| 66 |
+
links.append({'topic_key':t['topic_key'],'unit_id':uid,'record_id':cid,'input_key':output['input_key'],'aspect_index':i,'aspect_span':{k:aspect[k]for k in ['text','start','end','probability']},'opinion_spans_in_same_unit':same,'opinion_spans_outside_unit_same_comment':len(ops)-same,'relation_semantic_validity':'unverified','formal_attribute':None})
|
| 67 |
+
global_candidates={cid for cid in t['membership']['record_ids']if by_input[digest(f[cid]['raw_text'].encode())]['raw_model_output'].get('评价维度',[])}
|
| 68 |
+
topics.append({'topic_key':t['topic_key'],'membership_sha256':t['membership_sha256'],'original_comment_support':t['original_comment_support'],'comments_with_returned_aspect_somewhere_in_body':len(global_candidates),'comments_with_aspect_span_in_own_topic_unit':len(own),'comments_with_only_other_unit_aspect':len(global_candidates-own),'comments_without_returned_aspect':t['original_comment_support']-len(global_candidates),'aspect_event_links':event_links,'opinion_links_outside_aspect_unit':cross_opinions,'canonical_attribute':None,'decision':'unresolved_pending_semantic_validation','model_absence_is_not_nonfeature':True})
|
| 69 |
+
save_rows('topic_uie_feature_projection.jsonl',topics);save_rows('topic_aspect_span_links.jsonl',links)
|
| 70 |
+
audit={'schema':'buv-uie-feature-replay-v1','records_replayed':len(records),'unique_raw_inputs_replayed':len(by_input),'exact_text_inference_reuse_extra_original_records':sum(r['input_key']is not None for r in records)-len(by_input),'empty_body_records_retained_not_inferred':sum(r['input_key']is None for r in records),'aspect_spans_validated':aspect_count,'opinion_spans_validated':opinion_count,'invalid_source_spans':0,'role_views':role_views,'topic_rows':len(topics),'topic_aspect_span_links':len(links),'all_topic_rows_retained':len(topics)==208,'topic_source_input_receipts':input_receipts,'parent_context_injected_as_own_text':False,'original_id_time_source_role_and_text_preserved':True,'formal_attributes_or_weights_generated':False,'semantic_accuracy_evaluated':False,'vendor_control_is_interface_only':True}
|
| 71 |
+
save('replay_audit.json',audit)
|
| 72 |
+
public=a.root/'shared_payloads';public.mkdir(exist_ok=True);files=[]
|
| 73 |
+
names=['protocol.json','runtime.json','vendor_interface_control.json','record_mapping.jsonl','model_outputs.jsonl','summary.json','record_feature_projection.jsonl','topic_uie_feature_projection.jsonl','topic_aspect_span_links.jsonl','replay_audit.json']
|
| 74 |
+
for name in names:
|
| 75 |
+
data=(raw/name).read_bytes();metadata={};target=name
|
| 76 |
+
if name.endswith('.jsonl'):
|
| 77 |
+
target+='.gz';b=io.BytesIO()
|
| 78 |
+
with gzip.GzipFile(filename='',mode='wb',fileobj=b,mtime=0)as h:h.write(data)
|
| 79 |
+
encoded=b.getvalue();assert gzip.decompress(encoded)==data;metadata={'compression':'gzip','decoded_sha256':digest(data),'decoded_bytes':len(data)}
|
| 80 |
+
else:encoded=data
|
| 81 |
+
(public/target).write_bytes(encoded);files.append({'path':target,'sha256':digest(encoded),'bytes':len(encoded),**metadata})
|
| 82 |
+
for src,name in [(a.repo/'scripts/extract_preperiod_uie_features.py','processing/extract_preperiod_uie_features.py'),(Path(__file__),'processing/audit_uie_features.py')]:
|
| 83 |
+
dest=public/name;dest.parent.mkdir(exist_ok=True);shutil.copyfile(src,dest);files.append({'path':name,'sha256':digest(dest.read_bytes()),'bytes':dest.stat().st_size})
|
| 84 |
+
manifest={'schema':'buv-uie-span-feature-manifest-v1','files':files,'model_weights_duplicated':False,'local_model_file_hashes_in_protocol':True,'original_comment_captures_or_prior_hf_files_changed':False,'formal_attribute_catalog_or_weights':False,'processing_requires_repo_checkout_with_prior_fixed_sources':True,'privacy':'Only already shared development comment text, native comment/video IDs and deidentified model spans; no native user IDs, browser state, cookies, credentials, private paths or platform requests.'}
|
| 85 |
+
(public/'MANIFEST.json').write_text(json.dumps(manifest,ensure_ascii=False,indent=2)+'\n');print(json.dumps({k:v for k,v in audit.items()if k not in ['role_views','topic_source_input_receipts']},ensure_ascii=False));print('shared_files',len(files)+1)
|
| 86 |
+
if __name__=='__main__':main()
|
supplements/20261025_buv_preperiod_uie_features/processing/extract_preperiod_uie_features.py
ADDED
|
@@ -0,0 +1,223 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Frozen local UIE aspect/opinion features; never decides formal attributes.
|
| 2 |
+
|
| 3 |
+
Use exact shared development bodies, retaining every original ID. Identical raw
|
| 4 |
+
inputs may reuse one inference result; no record or vote is removed. An empty
|
| 5 |
+
model result means no span returned at the decoder setting, not no attribute.
|
| 6 |
+
"""
|
| 7 |
+
|
| 8 |
+
import argparse
|
| 9 |
+
from collections import Counter
|
| 10 |
+
from datetime import datetime, timezone
|
| 11 |
+
import importlib.metadata
|
| 12 |
+
import json
|
| 13 |
+
import math
|
| 14 |
+
import os
|
| 15 |
+
from pathlib import Path
|
| 16 |
+
import platform
|
| 17 |
+
import shutil
|
| 18 |
+
import sys
|
| 19 |
+
import time
|
| 20 |
+
|
| 21 |
+
from build_buv_pilot_panel import immutable_reader
|
| 22 |
+
from prepare_preperiod_topics import digest, write_json, write_rows
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
AUDIT = 'docs/sources/20261025/buv_preperiod_context_feature_audit.json'
|
| 26 |
+
MODEL_FILES = {
|
| 27 |
+
'model_config.json': 'be9c5dd75a3b80cc98340286372886c4639be8e2dc08d963a82c74b5a4eb1630',
|
| 28 |
+
'model_state.pdparams': '580a41aa168bc4732bd938df782efa90fb2009f321c7ab3aa943a5005a97b34a',
|
| 29 |
+
'special_tokens_map.json': '303df45a03609e4ead04bc3dc1536d0ab19b5358db685b6f3da123d05ec200e3',
|
| 30 |
+
'tokenizer_config.json': '0f0698c70f5c8fc684e45e3704905b2aa3a83864b558ee0af43fb975975101c9',
|
| 31 |
+
'vocab.txt': '8b99e7ded859fe015d33329c4a6d75cfba7784cfe8d82db7551fbf481f262fbb',
|
| 32 |
+
}
|
| 33 |
+
SCHEMA = [{'评价维度': ['观点词']}]
|
| 34 |
+
CONFIG = {'batch_size': 8, 'max_seq_len': 256, 'position_prob': .5,
|
| 35 |
+
'split_sentence': False, 'num_workers': 0, 'use_fast': False}
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
def validate_span(text, span):
|
| 39 |
+
reasons = []
|
| 40 |
+
start, end = span.get('start'), span.get('end')
|
| 41 |
+
if not (type(start) is int and type(end) is int and 0 <= start < end <= len(text)):
|
| 42 |
+
reasons.append('invalid_source_offset')
|
| 43 |
+
elif text[start:end] != span.get('text'):
|
| 44 |
+
reasons.append('source_substring_mismatch')
|
| 45 |
+
probability = span.get('probability')
|
| 46 |
+
if (not isinstance(probability, (int, float)) or not math.isfinite(probability)
|
| 47 |
+
or not 0 <= probability <= 1):
|
| 48 |
+
reasons.append('invalid_probability')
|
| 49 |
+
return {'source_span_valid': not reasons, 'reason_codes': reasons,
|
| 50 |
+
'semantic_validity': 'unverified'}
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
def relation_evidence(text, result):
|
| 54 |
+
aspects = []
|
| 55 |
+
for index, aspect in enumerate(result.get('评价维度', [])):
|
| 56 |
+
aspects.append({'aspect_index': index, 'aspect': aspect,
|
| 57 |
+
'aspect_validation': validate_span(text, aspect),
|
| 58 |
+
'opinion_validations': [{'opinion_index': j, **validate_span(text, opinion)}
|
| 59 |
+
for j, opinion in enumerate(aspect.get('relations', {}).get('观点词', []))],
|
| 60 |
+
'relation_semantic_validity': 'unverified', 'formal_attribute': None})
|
| 61 |
+
return aspects
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
def model_inputs(features):
|
| 65 |
+
documents, mapping = {}, []
|
| 66 |
+
for row in features:
|
| 67 |
+
text = row['raw_text']
|
| 68 |
+
key = digest(text.encode()) if text.strip() else None
|
| 69 |
+
if key is not None:
|
| 70 |
+
if key in documents and documents[key] != text:
|
| 71 |
+
raise ValueError('Raw input hash collision')
|
| 72 |
+
documents[key] = text
|
| 73 |
+
mapping.append({'record_id': row['record_id'], 'video_id': row['video_id'],
|
| 74 |
+
'created_at_beijing': row['created_at_beijing'], 'is_source_author': row['is_source_author'],
|
| 75 |
+
'depth': row['depth'], 'input_key': key, 'raw_text_sha256': digest(text.encode()),
|
| 76 |
+
'state': 'not_called_empty_body' if key is None else 'pending_model_inference',
|
| 77 |
+
'formal_attribute_assignment': None})
|
| 78 |
+
if len({r['record_id'] for r in mapping}) != len(mapping):
|
| 79 |
+
raise ValueError('Duplicate original development ID')
|
| 80 |
+
return documents, mapping
|
| 81 |
+
|
| 82 |
+
|
| 83 |
+
def run(args):
|
| 84 |
+
out, repo = args.out.resolve(), args.repo.resolve()
|
| 85 |
+
if out == repo or repo in out.parents or (out.exists() and any(out.iterdir())):
|
| 86 |
+
raise ValueError('Preserve prior outputs and keep text/model cache outside Git')
|
| 87 |
+
read, receipts = immutable_reader(repo); audit = read(AUDIT)
|
| 88 |
+
if audit['native_product_id'] != '3632234840075719990':
|
| 89 |
+
raise ValueError('Unexpected pilot product')
|
| 90 |
+
expected = next(f for f in audit['hf_append_receipt']['files']
|
| 91 |
+
if f['path'].endswith('/development_features.jsonl'))
|
| 92 |
+
if digest(args.features.read_bytes()) != expected['sha256']:
|
| 93 |
+
raise ValueError('Frozen development feature input changed')
|
| 94 |
+
features = [json.loads(s) for s in args.features.read_text().splitlines()]
|
| 95 |
+
documents, mapping = model_inputs(features)
|
| 96 |
+
if len(mapping) != audit['summary']['development_records']:
|
| 97 |
+
raise ValueError('Development membership changed')
|
| 98 |
+
out.mkdir(parents=True, exist_ok=True); snapshot = out / 'model_snapshot'; snapshot.mkdir()
|
| 99 |
+
model_files = []
|
| 100 |
+
for name, expected_hash in MODEL_FILES.items():
|
| 101 |
+
source = args.model_dir / name
|
| 102 |
+
if digest(source.read_bytes()) != expected_hash:
|
| 103 |
+
raise ValueError('Frozen model file differs: ' + name)
|
| 104 |
+
target = snapshot / name; shutil.copy2(source, target)
|
| 105 |
+
if digest(target.read_bytes()) != expected_hash:
|
| 106 |
+
raise ValueError('Model snapshot copy differs: ' + name)
|
| 107 |
+
model_files.append({'path': name, 'sha256': expected_hash, 'bytes': target.stat().st_size})
|
| 108 |
+
for key in ['OMP_NUM_THREADS', 'MKL_NUM_THREADS', 'OPENBLAS_NUM_THREADS', 'VECLIB_MAXIMUM_THREADS']:
|
| 109 |
+
os.environ[key] = '1'
|
| 110 |
+
os.environ['HF_HUB_OFFLINE'] = '1'; os.environ['TRANSFORMERS_OFFLINE'] = '1'
|
| 111 |
+
network_attempts = []
|
| 112 |
+
|
| 113 |
+
def no_network(event, values):
|
| 114 |
+
if event == 'socket.connect' and getattr(values[0], 'family', None) in (2, 30, 10):
|
| 115 |
+
network_attempts.append('blocked_internet_socket_connect')
|
| 116 |
+
raise RuntimeError('Local-only model run: Internet connection disabled')
|
| 117 |
+
|
| 118 |
+
sys.addaudithook(no_network)
|
| 119 |
+
protocol = {'schema': 'preperiod-uie-span-features-v1', 'source_receipts': receipts,
|
| 120 |
+
'script_sha256': digest(Path(__file__).read_bytes()), 'input_sha256': expected['sha256'],
|
| 121 |
+
'input_revision': audit['hf_append_receipt']['supplement_revision'],
|
| 122 |
+
'model': 'uie-senta-base', 'model_files': model_files, 'schema_request': SCHEMA,
|
| 123 |
+
'decoder_config': CONFIG, 'decoder_threshold_is_not_calibrated_semantic_screen': True,
|
| 124 |
+
'input_policy': 'Exact shared development body, no trimming or contextual concatenation; empty bodies retained without model call; exact raw-text inference reuse only.',
|
| 125 |
+
'original_records': len(mapping), 'nonempty_records': sum(r['input_key'] is not None for r in mapping),
|
| 126 |
+
'unique_nonempty_raw_inputs': len(documents), 'source_author_records': sum(r['is_source_author'] for r in mapping),
|
| 127 |
+
'device': 'cpu', 'threads': 1, 'seed': 2026, 'python': sys.version.split()[0], 'machine': platform.machine(),
|
| 128 |
+
'metadata_versions': {n: importlib.metadata.version(n) for n in ['paddlepaddle', 'paddlenlp', 'numpy']},
|
| 129 |
+
'formal_attribute_decisions': False, 'holdout_inputs': False, 'parent_context_used_as_own_text': False,
|
| 130 |
+
'new_platform_requests': 0, 'started_at_utc': datetime.now(timezone.utc).isoformat()}
|
| 131 |
+
write_json(out / 'protocol.json', protocol); write_rows(out / 'record_mapping.jsonl', mapping)
|
| 132 |
+
started = time.monotonic()
|
| 133 |
+
import paddle
|
| 134 |
+
import numpy as np
|
| 135 |
+
from paddlenlp import Taskflow
|
| 136 |
+
from paddlenlp.taskflow.task import Task
|
| 137 |
+
import paddlenlp.taskflow.sentiment_analysis as implementation
|
| 138 |
+
import paddlenlp.taskflow.task as task_implementation
|
| 139 |
+
paddle.set_device('cpu'); paddle.disable_static(); paddle.seed(2026); np.random.seed(2026)
|
| 140 |
+
|
| 141 |
+
class DynamicPredictor:
|
| 142 |
+
def __init__(self, model): self.model = model
|
| 143 |
+
|
| 144 |
+
def run(self, unused, inputs):
|
| 145 |
+
tensors = {k: paddle.to_tensor(v) for k, v in inputs.items()}
|
| 146 |
+
tensors['position_ids'] = tensors.pop('pos_ids')
|
| 147 |
+
tensors['attention_mask'] = tensors.pop('att_mask')
|
| 148 |
+
with paddle.no_grad(): start, end = self.model(**tensors)
|
| 149 |
+
return start.numpy(), end.numpy()
|
| 150 |
+
|
| 151 |
+
def local_dynamic(task):
|
| 152 |
+
task._predictor_type = 'local-dynamic'
|
| 153 |
+
task._construct_model(task.model)
|
| 154 |
+
task.predictor = DynamicPredictor(task._model)
|
| 155 |
+
|
| 156 |
+
original = Task._get_inference_model
|
| 157 |
+
Task._get_inference_model = local_dynamic
|
| 158 |
+
try:
|
| 159 |
+
model = Taskflow('sentiment_analysis', model='uie-senta-base', schema=SCHEMA,
|
| 160 |
+
task_path=str(snapshot), device_id=-1, **CONFIG)
|
| 161 |
+
finally:
|
| 162 |
+
Task._get_inference_model = original
|
| 163 |
+
runtime = {'paddle_module_version': paddle.__version__, 'paddlenlp_metadata_version': protocol['metadata_versions']['paddlenlp'],
|
| 164 |
+
'taskflow_source_sha256': digest(Path(task_implementation.__file__).read_bytes()),
|
| 165 |
+
'senta_source_sha256': digest(Path(implementation.__file__).read_bytes()),
|
| 166 |
+
'runtime_adapter': 'Existing dynamic-predictor interface reused in this process only; no installed package edited.',
|
| 167 |
+
'initialized_seconds': time.monotonic() - started}
|
| 168 |
+
write_json(out / 'runtime.json', runtime)
|
| 169 |
+
control = '蛋糕味道不错,店家服务也很热情'
|
| 170 |
+
result = model([control])[0]; validation = relation_evidence(control, result)
|
| 171 |
+
write_json(out / 'vendor_interface_control.json', {'text': control, 'result': result, 'validation': validation,
|
| 172 |
+
'source': 'https://paddlenlp.readthedocs.io/en/stable/model_zoo/taskflow.html',
|
| 173 |
+
'control_only_not_research_data_or_semantic_gold': True})
|
| 174 |
+
if not validation or not all(a['aspect_validation']['source_span_valid'] for a in validation):
|
| 175 |
+
raise RuntimeError('Vendor interface control failed; preserve evidence without processing research text')
|
| 176 |
+
print(json.dumps({'phase': 'local_model_and_control_ready', 'inputs': len(documents)}), flush=True)
|
| 177 |
+
output = out / 'model_outputs.jsonl'; completed = 0; aspects = opinions = invalid = 0
|
| 178 |
+
items = sorted(documents.items())
|
| 179 |
+
with output.open('w') as stream:
|
| 180 |
+
for start in range(0, len(items), CONFIG['batch_size']):
|
| 181 |
+
batch = items[start:start + CONFIG['batch_size']]
|
| 182 |
+
results = model([text for _, text in batch])
|
| 183 |
+
if len(results) != len(batch): raise ValueError('Model batch result count changed')
|
| 184 |
+
for (key, text), raw in zip(batch, results):
|
| 185 |
+
events = relation_evidence(text, raw)
|
| 186 |
+
record = {'input_key': key, 'text': text, 'raw_model_output': raw, 'events': events,
|
| 187 |
+
'formal_attribute_decision': None, 'semantic_validity': 'unverified'}
|
| 188 |
+
stream.write(json.dumps(record, ensure_ascii=False, allow_nan=False) + '\n')
|
| 189 |
+
completed += 1; aspects += len(events)
|
| 190 |
+
opinions += sum(len(a['opinion_validations']) for a in events)
|
| 191 |
+
invalid += sum(not a['aspect_validation']['source_span_valid'] for a in events)
|
| 192 |
+
invalid += sum(not o['source_span_valid'] for a in events for o in a['opinion_validations'])
|
| 193 |
+
stream.flush()
|
| 194 |
+
progress = {'completed_unique_inputs': completed, 'total_unique_inputs': len(items),
|
| 195 |
+
'returned_aspect_candidates': aspects, 'returned_opinion_candidates': opinions,
|
| 196 |
+
'invalid_source_spans': invalid, 'elapsed_seconds': time.monotonic() - started}
|
| 197 |
+
write_json(out / 'progress.json', progress)
|
| 198 |
+
if completed % 64 == 0 or completed == len(items): print(json.dumps(progress), flush=True)
|
| 199 |
+
for name, expected_hash in MODEL_FILES.items():
|
| 200 |
+
if digest((args.model_dir / name).read_bytes()) != expected_hash:
|
| 201 |
+
raise ValueError('Original model changed during read-only processing')
|
| 202 |
+
summary = {'schema': protocol['schema'], 'status': 'MODEL_CANDIDATE_FEATURES_EXTRACTED_NOT_SEMANTICALLY_VALIDATED',
|
| 203 |
+
**progress, 'original_records': len(mapping), 'empty_records_without_inference': sum(r['input_key'] is None for r in mapping),
|
| 204 |
+
'all_original_ids_retained': True, 'network_connection_attempts_blocked': len(network_attempts),
|
| 205 |
+
'model_downloads_or_installs': 0, 'new_comment_jobs': 0, 'formal_attribute_decisions': 0,
|
| 206 |
+
'formal_weights_or_matching': None, 'finished_at_utc': datetime.now(timezone.utc).isoformat(),
|
| 207 |
+
'limits': ['Model aspect/opinion outputs and their relations are unvalidated candidates, not formal attributes or semantic gold.',
|
| 208 |
+
'No returned span at the fixed decoder threshold is not proof of absent attributes, absent information need or non-feature content.',
|
| 209 |
+
'Question/preference/experience roles and focal-product references remain unvalidated; source-author false is not verified consumer identity.',
|
| 210 |
+
'The vendor example checks model and coordinate plumbing only; it does not measure study accuracy.',
|
| 211 |
+
'No sentiment-performance measurement, topic selection/naming, threshold tuning, formal weights, matching or regression.']}
|
| 212 |
+
write_json(out / 'summary.json', summary); print(json.dumps(summary, ensure_ascii=False), flush=True)
|
| 213 |
+
|
| 214 |
+
|
| 215 |
+
def main():
|
| 216 |
+
p = argparse.ArgumentParser(description=__doc__)
|
| 217 |
+
p.add_argument('--repo', type=Path, default=Path(__file__).resolve().parents[1])
|
| 218 |
+
p.add_argument('--features', type=Path, required=True); p.add_argument('--model-dir', type=Path, required=True)
|
| 219 |
+
p.add_argument('--out', type=Path, required=True)
|
| 220 |
+
run(p.parse_args())
|
| 221 |
+
|
| 222 |
+
|
| 223 |
+
if __name__ == '__main__': main()
|
supplements/20261025_buv_preperiod_uie_features/protocol.json
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"schema": "preperiod-uie-span-features-v1",
|
| 3 |
+
"source_receipts": {
|
| 4 |
+
"docs/sources/20261025/buv_preperiod_context_feature_audit.json": {
|
| 5 |
+
"sha256": "6db9c1cae406599e9d0becf5b19efbdaa71d15eb61bdeeccd1aa554270f66adf",
|
| 6 |
+
"git_blob_sha": "218cb0e763fb45d69a917adf3f48d247e2691c7b",
|
| 7 |
+
"bytes": 13642
|
| 8 |
+
}
|
| 9 |
+
},
|
| 10 |
+
"script_sha256": "2586e35919a3fa49654f4bced0884749e7d325f5bf6cf0af8a3c12f80a65de40",
|
| 11 |
+
"input_sha256": "8413e51d5198d4657c66543f5df732df431116c89802328f5855fc777a148826",
|
| 12 |
+
"input_revision": "834fc8d34682424b6227d7e3ab986203c4305dfe",
|
| 13 |
+
"model": "uie-senta-base",
|
| 14 |
+
"model_files": [
|
| 15 |
+
{
|
| 16 |
+
"path": "model_config.json",
|
| 17 |
+
"sha256": "be9c5dd75a3b80cc98340286372886c4639be8e2dc08d963a82c74b5a4eb1630",
|
| 18 |
+
"bytes": 474
|
| 19 |
+
},
|
| 20 |
+
{
|
| 21 |
+
"path": "model_state.pdparams",
|
| 22 |
+
"sha256": "580a41aa168bc4732bd938df782efa90fb2009f321c7ab3aa943a5005a97b34a",
|
| 23 |
+
"bytes": 471807693
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"path": "special_tokens_map.json",
|
| 27 |
+
"sha256": "303df45a03609e4ead04bc3dc1536d0ab19b5358db685b6f3da123d05ec200e3",
|
| 28 |
+
"bytes": 112
|
| 29 |
+
},
|
| 30 |
+
{
|
| 31 |
+
"path": "tokenizer_config.json",
|
| 32 |
+
"sha256": "0f0698c70f5c8fc684e45e3704905b2aa3a83864b558ee0af43fb975975101c9",
|
| 33 |
+
"bytes": 235
|
| 34 |
+
},
|
| 35 |
+
{
|
| 36 |
+
"path": "vocab.txt",
|
| 37 |
+
"sha256": "8b99e7ded859fe015d33329c4a6d75cfba7784cfe8d82db7551fbf481f262fbb",
|
| 38 |
+
"bytes": 186807
|
| 39 |
+
}
|
| 40 |
+
],
|
| 41 |
+
"schema_request": [
|
| 42 |
+
{
|
| 43 |
+
"评价维度": [
|
| 44 |
+
"观点词"
|
| 45 |
+
]
|
| 46 |
+
}
|
| 47 |
+
],
|
| 48 |
+
"decoder_config": {
|
| 49 |
+
"batch_size": 8,
|
| 50 |
+
"max_seq_len": 256,
|
| 51 |
+
"position_prob": 0.5,
|
| 52 |
+
"split_sentence": false,
|
| 53 |
+
"num_workers": 0,
|
| 54 |
+
"use_fast": false
|
| 55 |
+
},
|
| 56 |
+
"decoder_threshold_is_not_calibrated_semantic_screen": true,
|
| 57 |
+
"input_policy": "Exact shared development body, no trimming or contextual concatenation; empty bodies retained without model call; exact raw-text inference reuse only.",
|
| 58 |
+
"original_records": 1086,
|
| 59 |
+
"nonempty_records": 1072,
|
| 60 |
+
"unique_nonempty_raw_inputs": 771,
|
| 61 |
+
"source_author_records": 51,
|
| 62 |
+
"device": "cpu",
|
| 63 |
+
"threads": 1,
|
| 64 |
+
"seed": 2026,
|
| 65 |
+
"python": "3.12.11",
|
| 66 |
+
"machine": "arm64",
|
| 67 |
+
"metadata_versions": {
|
| 68 |
+
"paddlepaddle": "3.2.0",
|
| 69 |
+
"paddlenlp": "2.8.1",
|
| 70 |
+
"numpy": "2.2.6"
|
| 71 |
+
},
|
| 72 |
+
"formal_attribute_decisions": false,
|
| 73 |
+
"holdout_inputs": false,
|
| 74 |
+
"parent_context_used_as_own_text": false,
|
| 75 |
+
"new_platform_requests": 0,
|
| 76 |
+
"started_at_utc": "2026-10-24T19:17:22.989378+00:00"
|
| 77 |
+
}
|
supplements/20261025_buv_preperiod_uie_features/record_feature_projection.jsonl.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:329d92628b5b60cfde4f89479ce19a2567553dd4e7854519c5167982ff5855e4
|
| 3 |
+
size 63392
|
supplements/20261025_buv_preperiod_uie_features/record_mapping.jsonl.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9ed9f8b8500e7b91a83f126f60f41efcef7a43b0d2804ddeb9024b7ffeb9a2bf
|
| 3 |
+
size 61669
|
supplements/20261025_buv_preperiod_uie_features/replay_audit.json
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"schema": "buv-uie-feature-replay-v1",
|
| 3 |
+
"records_replayed": 1086,
|
| 4 |
+
"unique_raw_inputs_replayed": 771,
|
| 5 |
+
"exact_text_inference_reuse_extra_original_records": 301,
|
| 6 |
+
"empty_body_records_retained_not_inferred": 14,
|
| 7 |
+
"aspect_spans_validated": 520,
|
| 8 |
+
"opinion_spans_validated": 483,
|
| 9 |
+
"invalid_source_spans": 0,
|
| 10 |
+
"role_views": {
|
| 11 |
+
"all_roles": {
|
| 12 |
+
"records": 1086,
|
| 13 |
+
"empty_not_inferred": 14,
|
| 14 |
+
"records_with_returned_candidates": 626,
|
| 15 |
+
"records_without_returned_candidates": 446,
|
| 16 |
+
"returned_aspect_event_candidates": 715,
|
| 17 |
+
"returned_opinion_event_candidates": 672
|
| 18 |
+
},
|
| 19 |
+
"non_source_author": {
|
| 20 |
+
"records": 1035,
|
| 21 |
+
"empty_not_inferred": 14,
|
| 22 |
+
"records_with_returned_candidates": 600,
|
| 23 |
+
"records_without_returned_candidates": 421,
|
| 24 |
+
"returned_aspect_event_candidates": 688,
|
| 25 |
+
"returned_opinion_event_candidates": 649
|
| 26 |
+
}
|
| 27 |
+
},
|
| 28 |
+
"topic_rows": 208,
|
| 29 |
+
"topic_aspect_span_links": 5612,
|
| 30 |
+
"all_topic_rows_retained": true,
|
| 31 |
+
"topic_source_input_receipts": [
|
| 32 |
+
{
|
| 33 |
+
"path": "all_roles_thread_discovery/unique_documents.jsonl",
|
| 34 |
+
"sha256": "f9f8fe02cfd4aab13167984fb7b0bb84a31e156e9532d854756bb36d77ac0370",
|
| 35 |
+
"repository": "boardman7/cavfa-short-video-data",
|
| 36 |
+
"revision": "ed8fa1dcd15f414431ed493113c0b8a58e476cda"
|
| 37 |
+
},
|
| 38 |
+
{
|
| 39 |
+
"path": "all_roles/seed_2026/topic_evidence.jsonl.gz",
|
| 40 |
+
"sha256": "80565531252746e5bf3893e17438399797d7e47450955ebb6759363c6e33cb24",
|
| 41 |
+
"repository": "boardman7/cavfa-short-video-data",
|
| 42 |
+
"revision": "be52f863c4e2cceffc0495b8e513e7d27d8275d4"
|
| 43 |
+
},
|
| 44 |
+
{
|
| 45 |
+
"path": "all_roles/seed_2027/topic_evidence.jsonl.gz",
|
| 46 |
+
"sha256": "81598de5eba4c45743604b1c733d9c299cdac35733f6bee712f25e8f49abba7b",
|
| 47 |
+
"repository": "boardman7/cavfa-short-video-data",
|
| 48 |
+
"revision": "be52f863c4e2cceffc0495b8e513e7d27d8275d4"
|
| 49 |
+
},
|
| 50 |
+
{
|
| 51 |
+
"path": "all_roles/seed_2028/topic_evidence.jsonl.gz",
|
| 52 |
+
"sha256": "75d126b4bd9074f1343cbfc72d96a004432efa0ab0a9800f38fc60df8fccffec",
|
| 53 |
+
"repository": "boardman7/cavfa-short-video-data",
|
| 54 |
+
"revision": "be52f863c4e2cceffc0495b8e513e7d27d8275d4"
|
| 55 |
+
},
|
| 56 |
+
{
|
| 57 |
+
"path": "all_roles/seed_2026_repeat/topic_evidence.jsonl.gz",
|
| 58 |
+
"sha256": "03498ce9a29d772c51ed61abba537126d46aa0e483ac3a8e5c6ecde6aced2e01",
|
| 59 |
+
"repository": "boardman7/cavfa-short-video-data",
|
| 60 |
+
"revision": "be52f863c4e2cceffc0495b8e513e7d27d8275d4"
|
| 61 |
+
},
|
| 62 |
+
{
|
| 63 |
+
"path": "non_author/seed_2026/topic_evidence.jsonl.gz",
|
| 64 |
+
"sha256": "28ec911a10699e1ea68c9299235f9225fc655d2881f30a174f00652e380dc281",
|
| 65 |
+
"repository": "boardman7/cavfa-short-video-data",
|
| 66 |
+
"revision": "be52f863c4e2cceffc0495b8e513e7d27d8275d4"
|
| 67 |
+
},
|
| 68 |
+
{
|
| 69 |
+
"path": "non_author/seed_2027/topic_evidence.jsonl.gz",
|
| 70 |
+
"sha256": "f46a17d2a5637f01682c60aca241def167ebdabdee8515acf8330da569143485",
|
| 71 |
+
"repository": "boardman7/cavfa-short-video-data",
|
| 72 |
+
"revision": "be52f863c4e2cceffc0495b8e513e7d27d8275d4"
|
| 73 |
+
},
|
| 74 |
+
{
|
| 75 |
+
"path": "non_author/seed_2028/topic_evidence.jsonl.gz",
|
| 76 |
+
"sha256": "617a63dcd90a5b7e873a1f2ddba30477654d2a6efbf2f084f138d87f3d2254f9",
|
| 77 |
+
"repository": "boardman7/cavfa-short-video-data",
|
| 78 |
+
"revision": "be52f863c4e2cceffc0495b8e513e7d27d8275d4"
|
| 79 |
+
},
|
| 80 |
+
{
|
| 81 |
+
"path": "non_author/seed_2026_repeat/topic_evidence.jsonl.gz",
|
| 82 |
+
"sha256": "b20e1640fc0465444614b7f0bc089bf6ae6f5727f32b3866daddfb61b2b0b9b5",
|
| 83 |
+
"repository": "boardman7/cavfa-short-video-data",
|
| 84 |
+
"revision": "be52f863c4e2cceffc0495b8e513e7d27d8275d4"
|
| 85 |
+
}
|
| 86 |
+
],
|
| 87 |
+
"parent_context_injected_as_own_text": false,
|
| 88 |
+
"original_id_time_source_role_and_text_preserved": true,
|
| 89 |
+
"formal_attributes_or_weights_generated": false,
|
| 90 |
+
"semantic_accuracy_evaluated": false,
|
| 91 |
+
"vendor_control_is_interface_only": true
|
| 92 |
+
}
|
supplements/20261025_buv_preperiod_uie_features/runtime.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"paddle_module_version": "3.2.0",
|
| 3 |
+
"paddlenlp_metadata_version": "2.8.1",
|
| 4 |
+
"taskflow_source_sha256": "d82dafe37d464a0d44f6c00fc96b3b402f47edb5c0a1fe3034571041f4ee1e5f",
|
| 5 |
+
"senta_source_sha256": "c0c3f1602c27ed69b6e2d988eb379ab2af8617ce06bfade8fc361f99f7fe5cb8",
|
| 6 |
+
"runtime_adapter": "Existing dynamic-predictor interface reused in this process only; no installed package edited.",
|
| 7 |
+
"initialized_seconds": 7.472332875011489
|
| 8 |
+
}
|
supplements/20261025_buv_preperiod_uie_features/summary.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"schema": "preperiod-uie-span-features-v1",
|
| 3 |
+
"status": "MODEL_CANDIDATE_FEATURES_EXTRACTED_NOT_SEMANTICALLY_VALIDATED",
|
| 4 |
+
"completed_unique_inputs": 771,
|
| 5 |
+
"total_unique_inputs": 771,
|
| 6 |
+
"returned_aspect_candidates": 520,
|
| 7 |
+
"returned_opinion_candidates": 483,
|
| 8 |
+
"invalid_source_spans": 0,
|
| 9 |
+
"elapsed_seconds": 349.7207794999995,
|
| 10 |
+
"original_records": 1086,
|
| 11 |
+
"empty_records_without_inference": 14,
|
| 12 |
+
"all_original_ids_retained": true,
|
| 13 |
+
"network_connection_attempts_blocked": 1,
|
| 14 |
+
"model_downloads_or_installs": 0,
|
| 15 |
+
"new_comment_jobs": 0,
|
| 16 |
+
"formal_attribute_decisions": 0,
|
| 17 |
+
"formal_weights_or_matching": null,
|
| 18 |
+
"finished_at_utc": "2026-10-24T19:23:13.185853+00:00",
|
| 19 |
+
"limits": [
|
| 20 |
+
"Model aspect/opinion outputs and their relations are unvalidated candidates, not formal attributes or semantic gold.",
|
| 21 |
+
"No returned span at the fixed decoder threshold is not proof of absent attributes, absent information need or non-feature content.",
|
| 22 |
+
"Question/preference/experience roles and focal-product references remain unvalidated; source-author false is not verified consumer identity.",
|
| 23 |
+
"The vendor example checks model and coordinate plumbing only; it does not measure study accuracy.",
|
| 24 |
+
"No sentiment-performance measurement, topic selection/naming, threshold tuning, formal weights, matching or regression."
|
| 25 |
+
]
|
| 26 |
+
}
|
supplements/20261025_buv_preperiod_uie_features/topic_aspect_span_links.jsonl.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8c0b1e74464d02dc1888fa6a0d718149f85b24a6a96adf7958a9a7f7fdd88daa
|
| 3 |
+
size 522171
|
supplements/20261025_buv_preperiod_uie_features/topic_uie_feature_projection.jsonl.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1adaae1d04c584d70dc7d611e6663cfe6d4e394ba45e7a022b512d89c5f477af
|
| 3 |
+
size 10773
|
supplements/20261025_buv_preperiod_uie_features/vendor_interface_control.json
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"text": "蛋糕味道不错,店家服务也很热情",
|
| 3 |
+
"result": {
|
| 4 |
+
"评价维度": [
|
| 5 |
+
{
|
| 6 |
+
"text": "味道",
|
| 7 |
+
"start": 2,
|
| 8 |
+
"end": 4,
|
| 9 |
+
"probability": 0.9105475365945388,
|
| 10 |
+
"relations": {
|
| 11 |
+
"观点词": [
|
| 12 |
+
{
|
| 13 |
+
"text": "不错",
|
| 14 |
+
"start": 4,
|
| 15 |
+
"end": 6,
|
| 16 |
+
"probability": 0.9946981266891619
|
| 17 |
+
}
|
| 18 |
+
]
|
| 19 |
+
}
|
| 20 |
+
},
|
| 21 |
+
{
|
| 22 |
+
"text": "服务",
|
| 23 |
+
"start": 9,
|
| 24 |
+
"end": 11,
|
| 25 |
+
"probability": 0.970909421275195,
|
| 26 |
+
"relations": {
|
| 27 |
+
"观点词": [
|
| 28 |
+
{
|
| 29 |
+
"text": "热情",
|
| 30 |
+
"start": 13,
|
| 31 |
+
"end": 15,
|
| 32 |
+
"probability": 0.9897222206316556
|
| 33 |
+
}
|
| 34 |
+
]
|
| 35 |
+
}
|
| 36 |
+
}
|
| 37 |
+
]
|
| 38 |
+
},
|
| 39 |
+
"validation": [
|
| 40 |
+
{
|
| 41 |
+
"aspect_index": 0,
|
| 42 |
+
"aspect": {
|
| 43 |
+
"text": "味道",
|
| 44 |
+
"start": 2,
|
| 45 |
+
"end": 4,
|
| 46 |
+
"probability": 0.9105475365945388,
|
| 47 |
+
"relations": {
|
| 48 |
+
"观点词": [
|
| 49 |
+
{
|
| 50 |
+
"text": "不错",
|
| 51 |
+
"start": 4,
|
| 52 |
+
"end": 6,
|
| 53 |
+
"probability": 0.9946981266891619
|
| 54 |
+
}
|
| 55 |
+
]
|
| 56 |
+
}
|
| 57 |
+
},
|
| 58 |
+
"aspect_validation": {
|
| 59 |
+
"source_span_valid": true,
|
| 60 |
+
"reason_codes": [],
|
| 61 |
+
"semantic_validity": "unverified"
|
| 62 |
+
},
|
| 63 |
+
"opinion_validations": [
|
| 64 |
+
{
|
| 65 |
+
"opinion_index": 0,
|
| 66 |
+
"source_span_valid": true,
|
| 67 |
+
"reason_codes": [],
|
| 68 |
+
"semantic_validity": "unverified"
|
| 69 |
+
}
|
| 70 |
+
],
|
| 71 |
+
"relation_semantic_validity": "unverified",
|
| 72 |
+
"formal_attribute": null
|
| 73 |
+
},
|
| 74 |
+
{
|
| 75 |
+
"aspect_index": 1,
|
| 76 |
+
"aspect": {
|
| 77 |
+
"text": "服务",
|
| 78 |
+
"start": 9,
|
| 79 |
+
"end": 11,
|
| 80 |
+
"probability": 0.970909421275195,
|
| 81 |
+
"relations": {
|
| 82 |
+
"观点词": [
|
| 83 |
+
{
|
| 84 |
+
"text": "热情",
|
| 85 |
+
"start": 13,
|
| 86 |
+
"end": 15,
|
| 87 |
+
"probability": 0.9897222206316556
|
| 88 |
+
}
|
| 89 |
+
]
|
| 90 |
+
}
|
| 91 |
+
},
|
| 92 |
+
"aspect_validation": {
|
| 93 |
+
"source_span_valid": true,
|
| 94 |
+
"reason_codes": [],
|
| 95 |
+
"semantic_validity": "unverified"
|
| 96 |
+
},
|
| 97 |
+
"opinion_validations": [
|
| 98 |
+
{
|
| 99 |
+
"opinion_index": 0,
|
| 100 |
+
"source_span_valid": true,
|
| 101 |
+
"reason_codes": [],
|
| 102 |
+
"semantic_validity": "unverified"
|
| 103 |
+
}
|
| 104 |
+
],
|
| 105 |
+
"relation_semantic_validity": "unverified",
|
| 106 |
+
"formal_attribute": null
|
| 107 |
+
}
|
| 108 |
+
],
|
| 109 |
+
"source": "https://paddlenlp.readthedocs.io/en/stable/model_zoo/taskflow.html",
|
| 110 |
+
"control_only_not_research_data_or_semantic_gold": true
|
| 111 |
+
}
|