使用ECDH/KKRT-PSI-NPC协议执行三方psi报错
运行代码其中一个节点如下: `import os import sys import time import logging import multiprocess from absl import app import spu import secretflow as sf logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)
cluster_config ={
'parties': {
'alice': {
'address': '10.200.3.32:8002',
'listen_addr': '0.0.0.0:8002'
},
'bob': {
'address': '10.200.3.33:8012',
'listen_addr': '0.0.0.0:8012'
},
'carol': {
'address': '10.200.3.34:8022',
'listen_addr': '0.0.0.0:8022'
},
},
'self_party': 'bob'
}
cluster_def = { 'nodes': [ {'party': 'alice', 'id': 'local:0', 'address': '10.200.3.32:12945'}, {'party': 'bob', 'id': 'local:1', 'address': '10.200.3.33:12946'}, {'party': 'carol', 'id': 'local:2', 'address': '10.200.3.34:12947'}, ], 'runtime_config': { 'protocol': spu.spu_pb2.SEMI2K, 'field': spu.spu_pb2.FM128, }, }
link_desc = { 'recv_timeout_ms': 3600000, }
def main(_): sf.init(address='10.200.3.33:8011', log_to_driver=True, cluster_config=cluster_config, omp_num_threads=multiprocess.cpu_count())
logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)
alice = sf.PYU('alice')
bob = sf.PYU('bob')
carol = sf.PYU('carol')
key_columns = ['姓名','证件类型','证件号码']
label_columns = ['register_date','age']
spu = sf.SPU(cluster_def, link_desc)
parent_path = '/jdxk/psi'
input_path = {
alice: f'{parent_path}/Atest.csv',
bob: f'{parent_path}/Btest.csv',
carol: f'{parent_path}/Ctest.csv',
}
output_path = {
alice: f'{parent_path}/psi_output.csv',
bob: f'{parent_path}/psi_output_bob.csv',
carol:f'{parent_path}/psi_output_carol.csv',
}
select_keys = {
alice: key_columns,
bob: key_columns,
# if run with `ECDH_PSI_3PC`, add carol
carol: key_columns,
}
spu = sf.SPU(cluster_def=cluster_def)
start = time.time()
reports = spu.psi_csv(
key=select_keys,
input_path=input_path,
output_path=output_path,
receiver='alice',
protocol='ECDH_PSI_NPC',
precheck_input=False, # will cost ext time if set True
broadcast_result=True, # will cost ext time if set True
)
print(f"psi reports: {reports}")
logging.info(f"cost time: {time.time() - start}")
sf.shutdown()
if name == 'main': app.run(main) `
运行卡在计算界面未出结果,其中两个节点的日志如下:
@dyx0001 好的我们复现一下
请问这个问题解决了么,我也有类似的问题,希望能请教一下
此issue已通过社区交流群方式复现解决,原因为数据问题。
@XiaoLazi 辛苦重新提一条issue
好的