`IndependentConfig` synthesis raises "Cliques must be unique."
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
- #4 của @gghatano — đã đóng, không merge
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 82/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Lĩnh vực
- data-engineering
Hướng nghiên cứu
Bắt đầu tại dpsynth/discrete_mechanisms/independent.py ở dòng 73 và chạy bản tái hiện pandas được cung cấp với IndependentConfig. Xác minh rằng đường dẫn INDEPENDENT không còn phát sinh duplicate-clique ValueError, trong khi MST và AIM vẫn hoạt động và các đầu vào ước lượng không thay đổi.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
Calling dpsynth.generate(...) with discrete_config=IndependentConfig() fails
with a ValueError from mbi.CliqueVector.expand. MST and AIM work on the same
input; only INDEPENDENT is affected.
Environment
- Linux, Python 3.12, current
mbi(git+https://github.com/ryan112358/mbi.git)
Reproduction
import pandas as pd
import dpsynth
from dpsynth import domain, discrete_mechanisms as dm
df = pd.DataFrame({
"a": ["x", "y", "x", "y"] * 50,
"b": [0, 1, 1, 0] * 50,
})
domains = {
"a": domain.CategoricalAttribute(possible_values=["x", "y"]),
"b": domain.CategoricalAttribute(possible_values=[0, 1]),
}
dpsynth.generate(df, domains, epsilon=1.0, delta=1e-5,
discrete_config=dm.IndependentConfig())
ValueError: Cliques must be unique.
File ".../dpsynth/discrete_mechanisms/independent.py", line 73, in run_mechanism
potentials = potentials.expand([m.clique for m in measurements])
File ".../mbi/clique_vector.py", line 55, in __attrs_post_init__
raise ValueError("Cliques must be unique.")
Cause
In independent.run_mechanism, measurements starts from
initial_measurements — the one-way marginals that
data_generation_v2.generate always passes in — and then the loop appends a
freshly measured one-way marginal for every attribute. So measurements
contains each one-way clique twice.
When initial_potentials is not None (e.g. the empty CliqueVector returned by
constraints.get_initial_parameters even when there are no cross-attribute
constraints), line 73 calls
potentials.expand([m.clique for m in measurements]) with that duplicated
clique list. Current mbi requires unique cliques in expand, so it raises.
Suggested fix
De-duplicate the clique list (order-preserving) before calling expand. The
measurements passed to mirror_descent are left unchanged, so estimation and
privacy accounting are unaffected. PR attached.
- Ngôn ngữ chính
- Python
- Star
- 32
- Fork
- 13
- Merge trung bình
- 3 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 31
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của google/dpsynth
-
Windows install of pylock.toml fails on the pipeline extra due to missing Windows wheel for python-dpCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Lazy-load TensorFlow for TFRecord-specific pipeline pathsCó thể đã có người làm @hanzalaareeb đã nhận 60 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
google/dpsynth#151 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
google/dpsynth#118 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của google/dpsynth
Issue tương tự
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 66/100
AlexsLemonade/scpca-docs#518 ·
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
rocketride-org/rocketride-server#2705 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Metabuilder-Labs/tokenjam#786 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
prototype(verifier_token): map disallowed warning to contraindicated before composite precedence checkCó thể đã có người làm @drk-ram đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
agentrust-io/trace-spec#582 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:cli priority:low refactor size:small
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
RonaldHensbergen/composable-data-stack#906 ·
Maintainer thường phản hồi trong vòng 1 ngày