diff --git a/prereqs_linux.sh b/prereqs_linux.sh index 449527a8..2496da7f 100755 --- a/prereqs_linux.sh +++ b/prereqs_linux.sh @@ -57,8 +57,9 @@ fi # Downloading the Google DP library git submodule update --init --recursive + # checkout out to particular commit -cd third_party/differential-privacy && git checkout 0b0a5c2315d84a6a7b1ff34591e33ec11680891e && \ +cd third_party/differential-privacy && git checkout 1b1dc6639173c0a13613189ec21851604a4c7335 && \ cd - # renaming workspace.bazel to workspace mv third_party/differential-privacy/cc/WORKSPACE.bazel third_party/differential-privacy/cc/WORKSPACE diff --git a/pydp/algorithms/algorithm.py b/pydp/algorithms/algorithm.py index 5e6d31bd..11edf264 100644 --- a/pydp/algorithms/algorithm.py +++ b/pydp/algorithms/algorithm.py @@ -11,7 +11,7 @@ def __init__(self, **kwargs): if "upper_bound" in kwargs and kwargs["upper_bound"] is None: kwargs.pop("upper_bound") - binded_class = f"{self.__class__.__name__}{self.__map_dtype_str(dtype)}" + binded_class = self.__class__.__name__ + self.__map_dtype_str(dtype) class_ = getattr(_algorithms, binded_class) self.dtype = dtype @@ -26,7 +26,7 @@ def __map_dtype_str(dtype): elif dtype == "float": return "Double" else: - raise RuntimeError(f"dtype: {dtype} is not supported") + raise RuntimeError("dtype: {} is not supported".format(dtype)) @property def epsilon(self): diff --git a/src/bindings/PyDP/algorithms/order_statistics.cpp b/src/bindings/PyDP/algorithms/order_statistics.cpp index 80442f6d..d39063cb 100644 --- a/src/bindings/PyDP/algorithms/order_statistics.cpp +++ b/src/bindings/PyDP/algorithms/order_statistics.cpp @@ -1,11 +1,12 @@ // Provides bindings for Order Statistics -#include "../pydp_lib/algorithm_builder.hpp" #include "algorithms/order-statistics.h" #include "pybind11/complex.h" #include "pybind11/functional.h" #include "pybind11/pybind11.h" #include "pybind11/stl.h" +#include "../pydp_lib/algorithm_builder.hpp" + using namespace std; namespace py = pybind11; diff --git a/tests/algorithms/test_distributions.py b/tests/algorithms/test_distributions.py index daf593ba..e9be26eb 100644 --- a/tests/algorithms/test_distributions.py +++ b/tests/algorithms/test_distributions.py @@ -5,8 +5,6 @@ from itertools import accumulate import math -pytestmark = pytest.mark.skip(reason="distributions fail to compile") - k_num_samples = 10000000 k_num_geometric_samples = 1000000 k_gaussian_samples = 1000000 diff --git a/tests/base/test_percentile.py b/tests/base/test_percentile.py index f79d8c36..8e4252d0 100644 --- a/tests/base/test_percentile.py +++ b/tests/base/test_percentile.py @@ -1,7 +1,10 @@ import pytest import pydp as dp -pytestmark = pytest.mark.skip(reason="this percentile is not the DP implementation") +# TODO: check whether to delete this test suit or update it +pytestmark = pytest.mark.skip( + reason="these tests were for the older percentile wrapping." +) @pytest.mark.parametrize("input_class", [dp.algorithms.laplacian.Percentile])