Files
ssw-mpc/examples/Cargo.toml
T
admin 49b421c23a feat(examples): 新增 mpc-examples,12 个场景对齐 nax/examples
- 新 workspace 成员 examples/(crate mpc-examples,publish = false):一场景一 bin,
  跑法 cargo run -p mpc-examples --bin 03_vertical_lr;src/lib.rs 只提供参与方启动、
  定点编解码、输出与断言,算法全在正文,调的是 mpc-* 真接口
- 12 个场景:01 密文四则/矩阵/sigmoid、02 PSI、03 纵向 LR、04 FedAvg、05 出域策略、
  06 DP-FedAvg、07 密文推理、08 PIR、09 SCQL、10 分箱 WOE/IV、11 试跑、12 两方部署
- 12 的部署物在 examples/12_k8s_two_party/:多阶段 Dockerfile + namespace /
  alice(Headless Service + Job,--listen)/ bob(Job,--connect)+ README;
  单二进制一条 TCP,不经 Ray,调度交给 k8s
- tools/ci.sh 加第 4 关「示例冒烟」,调新增的 tools/examples.sh:逐 bin 跑,
  判据为退出码 0 且输出无 [!!](check() 只打印不中断,只看退出码会漏断言)
- 正文记录三条实测契约:matmul_trunc 两入参都须是分片,否则结果翻倍;
  sigmoid_poly 只在 ±6 内有效,越界发散到 1e6;多项式输出须先 reveal 再解码
- 实测:07 密文与明文偏差 1.97e-5 且 AUC 一致;09 密态与明文逐组一致;
  11 同为 4 组 GROUP BY,逐组比较 156 轮 vs 整数码 23 轮
2026-11-05 20:55:07 +08:00

26 lines
1.1 KiB
TOML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
[package]
name = "mpc-examples"
description = "ssw-mpc 教学示例:12 个场景,每个一个 bin,cargo run -p mpc-examples --bin NN_name 直接看输出。"
version.workspace = true
edition.workspace = true
license.workspace = true
rust-version.workspace = true
# 示例不是交付物,不发 crates.io;但它**进 CI**(tools/examples.sh),
# 保证 crate API 变更时这里第一时间编译失败,而不是三个月后变成摆设。
publish = false
[dependencies]
mpc-core = { workspace = true, features = ["std"] }
mpc-vault = { path = "../crates/mpc-vault" }
mpc-ml = { path = "../crates/mpc-ml" }
mpc-fl = { path = "../crates/mpc-fl", features = ["secure"] }
mpc-policy = { path = "../crates/mpc-policy" }
mpc-he = { path = "../crates/mpc-he", features = ["std"] }
mpc-data = { path = "../crates/mpc-data" }
mpc-psi = { path = "../crates/mpc-psi" }
mpc-ir = { path = "../crates/mpc-ir" }
mpc-runtime = { path = "../crates/mpc-runtime" }
mpc-node = { path = "../crates/mpc-node" }
mpc-tee = { path = "../crates/mpc-tee", features = ["std"] }
mpc-sql = { path = "../crates/mpc-sql", features = ["secure"] }