Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

repo-sync-2025-01-08T19:34:57+0800 #162

Merged
merged 4 commits into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .bazelignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

# TODO(FIXME): add it back
heu/experimental/tfhe/
6 changes: 5 additions & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
common --experimental_repo_remote_exec
common --experimental_cc_shared_library

common --registry=https://raw.githubusercontent.com/secretflow/bazel-registry/main
common --registry=https://bcr.bazel.build
common --registry=https://baidu.github.io/babylon/registry

build --verbose_failures

build --incompatible_new_actions_api=false
Expand Down Expand Up @@ -46,7 +50,7 @@ build:macos --host_copt=-Wa,--noexecstack
# Bazel will automatic pick platform config since we have enable_platform_specific_config set
build:macos --features=-supports_dynamic_linker
build:macos --cxxopt -Wno-error=unused-const-variable
build:macos --cxxopt -Wno-error=sign-compare # for eigen 3.4
build:macos --cxxopt -Wno-error=sign-compare # for eigen 3.4
build:macos --macos_minimum_os=12.0

# static link libstdc++ & libgcc
Expand Down
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.5.0
7.4.1
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Cargo.lock

# Bazel files
bazel-*
MODULE.bazel.lock

# Temp IDE files
*.pdb
Expand Down
49 changes: 25 additions & 24 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ header: # <1>
license:
spdx-id: Apache-2.0 # <2>
copyright-owner: Ant Group Co., Ltd. # <3>
copyright-year: '2024' # <25>
copyright-year: "2024" # <25>
software-name: secretflow # <4>

pattern: | # <6>
Expand All @@ -19,31 +19,32 @@ header: # <1>
limitations under the License.

paths: # <7>
- '**'
- "**"

paths-ignore: # <8>
- '.circleci'
- '.github'
- '**/*.md'
- '**/*.yaml'
- '**/*.yml'
- '**/*.txt'
- '**/*.po'
- '**/*.rst'
- '**/*.lds'
- '**/*.patch'
- '**/*.bat'
- 'LICENSE'
- 'NOTICE'
- '.bazelversion'
- '.bazelignore'
- '.clang-format'
- '.gitattributes'
- '.gitignore'
- '.gitmodules'
- 'pyproject.toml'
- 'third_party/bazel_rust/**/*.bazel' # Generated
- 'third_party/bazel_rust/**/*.bzl' # Generated
- ".circleci"
- ".github"
- "**/*.md"
- "**/*.yaml"
- "**/*.yml"
- "**/*.txt"
- "**/*.po"
- "**/*.rst"
- "**/*.lds"
- "**/*.patch"
- "**/*.bat"
- "LICENSE"
- "NOTICE"
- ".bazelversion"
- ".bazelignore"
- ".clang-format"
- ".gitattributes"
- ".gitignore"
- ".gitmodules"
- "pyproject.toml"
- "MODULE.bazel.lock"
- "third_party/bazel_rust/**/*.bazel" # Generated
- "third_party/bazel_rust/**/*.bzl" # Generated

comment: never # <9>

Expand Down
21 changes: 21 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2024 Ant Group Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

load("@rules_python//python:pip.bzl", "compile_pip_requirements")

compile_pip_requirements(
name = "requirements",
src = "requirements.txt",
requirements_txt = "requirements_lock.txt",
)
78 changes: 78 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Copyright 2024 Ant Group Co., Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

###############################################################################
# Bazel now uses Bzlmod by default to manage external dependencies.
# Please consider migrating your external dependencies from WORKSPACE to MODULE.bazel.
#
# For more details, please check https://github.com/bazelbuild/bazel/issues/18958
###############################################################################

module(
name = "heu",
version = "0.5.1",
compatibility_level = 1,
)

bazel_dep(name = "yacl", version = "0.4.5b10-nightly-20241224")
bazel_dep(name = "seal", version = "3.6.6")
bazel_dep(name = "spdlog", version = "1.14.1")
bazel_dep(name = "fmt", version = "11.0.2")
bazel_dep(name = "msgpack-c", version = "6.1.0")
bazel_dep(name = "gflags", version = "2.2.2")
bazel_dep(name = "abseil-cpp", version = "20240722.0")
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "bazel_features", version = "1.20.0")
bazel_dep(name = "rules_python", version = "0.16.2")
bazel_dep(name = "pybind11_bazel", version = "2.13.6")
bazel_dep(name = "rules_cuda", version = "0.2.3")
bazel_dep(name = "cereal", version = "1.3.2")
bazel_dep(name = "platforms", version = "0.0.8")

# self-hosted registry
bazel_dep(name = "pailliercryptolib", version = "2.0.0-20231102-fdc2135")
bazel_dep(name = "org_interconnection", version = "0.0.1")
bazel_dep(name = "eigen", version = "3.4.90-20230801-66e8f3")

python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
ignore_root_user_error = True,
python_version = "3.10",
)

pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
extra_pip_args = [
],
hub_name = "pypi",
python_version = "3.10",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")

cuda = use_extension("@rules_cuda//cuda:extensions.bzl", "toolchain")
cuda.local_toolchain(
name = "local_cuda",
toolkit_path = "",
)
use_repo(cuda, "local_cuda")

bazel_dep(name = "rules_rust", version = "0.53.0")

# test
bazel_dep(name = "googletest", version = "1.15.2", dev_dependency = True)
bazel_dep(name = "google_benchmark", version = "1.8.5", dev_dependency = True)

non_module_dependencies = use_extension("//bazel:defs.bzl", "non_module_dependencies")
use_repo(non_module_dependencies, "com_github_nvlabs_cgbn")
1 change: 1 addition & 0 deletions README_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,3 +167,4 @@ bazel test heu/...

隐语是一个非常包容和开放的社区,我们欢迎任何形式的贡献,如果您想要改进
HEU,请参考[贡献指南](CONTRIBUTING.md)

109 changes: 0 additions & 109 deletions WORKSPACE

This file was deleted.

13 changes: 13 additions & 0 deletions bazel/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 2024 Ant Group Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
22 changes: 22 additions & 0 deletions bazel/defs.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2024 Ant Group Co., Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

load("//third_party/bazel_cpp:repositories.bzl", "heu_cpp_deps")

def _non_module_dependencies_impl(_ctx):
heu_cpp_deps()

non_module_dependencies = module_extension(
implementation = _non_module_dependencies_impl,
)
1 change: 1 addition & 0 deletions docs/locale/en/LC_MESSAGES/getting_started/faq.po
Original file line number Diff line number Diff line change
Expand Up @@ -269,3 +269,4 @@ msgstr ""
" on `HEU + SPU for LR (i.e., HESS-LR) "
"<https://github.com/secretflow/secretflow/blob/main/secretflow/ml/linear/hess_sgd/model.py>`__,"
" from which you can learn the usage of the HEU Device."

1 change: 1 addition & 0 deletions docs/locale/en/LC_MESSAGES/references/numpy_api.po
Original file line number Diff line number Diff line change
Expand Up @@ -855,3 +855,4 @@ msgid ""
"Compute tree predict based on split features and points, the tree may be "
"unbalanced."
msgstr ""

2 changes: 2 additions & 0 deletions docs/locale/en/LC_MESSAGES/references/phe_api.po
Original file line number Diff line number Diff line change
Expand Up @@ -441,3 +441,5 @@ msgstr ""
#: ../../docstring heu.phe.PyCapsule.setup:21 of
msgid "Setup phe environment by an already generated public key"
msgstr ""


1 change: 1 addition & 0 deletions docs/locale/en/LC_MESSAGES/references/upgrade_guide.po
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,4 @@ msgstr "If you encounter a compilation error, please pass in the schema paramete
"For example, if this line causes a compilation error: ``phe.BigintEncoder()``, "
"you should change it to ``phe.BigintEncoder(kit.get_schema())``. For more details, refer to the previous section on **API Changes**."


4 changes: 2 additions & 2 deletions heu/algorithms/incubator/mock_phe/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

load("@yacl//bazel:yacl.bzl", "yacl_cc_library", "yacl_cc_test")
load("@yacl//bazel:yacl.bzl", "yacl_cc_library")

package(default_visibility = ["//visibility:public"])

Expand All @@ -35,7 +35,7 @@ yacl_cc_library(
hdrs = ["base.h"],
deps = [
"//heu/spi/he/sketches/scalar/phe",
"@com_github_msgpack_msgpack//:msgpack",
"@msgpack-c//:msgpack",
"@yacl//yacl/utils:serializer",
],
)
Expand Down
Loading
Loading