Create Pybind wrappers for the Quantiles class
まだ誰も着手していません。
評価
調査の方向性
Start with cc/algorithms/quantiles.h to compare the C++ Builder and public methods, then inspect pydp/src/bindings/PyDP/algorithms/qunatile_tree.cpp for PyDP binding conventions. Add pydp/src/bindings/PyDP/algorithms/quantiles.cpp for the double instantiation, status handling, and mechanism enum. Done means the listed methods are exposed and Build failures raise Python exceptions.
索引モデルが issue の本文から書いたものです。
説明
Create Pybind wrappers for the Quantiles class
Create Pybind11 wrappers for the differential_privacy::Quantiles. This will expose the functionality to the PyDP library.
Background:
The C++ Differential Privacy library includes a Quantiles class for calculating differentially private quantiles ( source). The PyDP library, which provides Python wrappers for the C++ library, already has bindings for the QuantileTree class ( Python differential pr...). To provide a more complete and user-friendly API, we should also create wrappers for the higher-level Quantiles class.
Implementation Details:
The new wrappers should be created in a new file, pydp/src/bindings/PyDP/algorithms/quantiles.cpp. The Python API should follow the existing conventions in PyDP and mirror the C++ API of the Quantiles class as closely as possible.
The Quantiles class is templated on arithmetic types (int, double, etc.). The Pybind wrappers should be instantiated for common numerical only for double.
Classes and Methods to Wrap:
-
Quantiles.__init__: which callsQuantiles<double>::Builder. It should have all parameters as in Builder. -
Quantiles
The following public methods of the Quantiles class should be wrapped:
AddEntry(const T&)
Serialize() const
Merge(const Summary&)
GetQuantiles() const
Result()
Considerations:
-
The
Build()method returns anabsl::StatusOr. The wrappers should handle the status and raise an exception on failure. -
The SetLaplaceMechanism method takes a std::unique_ptr. For Python binding let's use enum - Laplace, Gaussian.
- 主要言語
- Python
- スター
- 550
- フォーク
- 142
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
OpenMined/PyDP のほかの issue
-
Type: Question :grey_question:
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
-
Type: Question :grey_question:
難易度 4/5 3〜5日 初心者へのやさしさ 32/100
-
Type: Improvement :chart_with_upwards_trend:
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
-
Type: New Feature :heavy_plus_sign:
難易度 3/5 1〜2日 初心者へのやさしさ 38/100
-
Support for M1 Mac?オープンStatus: Blocked :heavy_multiplication_x: Type: New Feature :heavy_plus_sign:
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
似ている issue
-
bug server
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
sportsdataverse/sportsdataverse-py#641 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
googleapis/google-cloud-python#18532 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信