Skip to content

Bump the pip group across 1 directory with 7 updates #15

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

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
eb3c4e0
Simplify build system.
james-choncholas May 2, 2024
a6af78f
Remove unused includes.
james-choncholas May 2, 2024
6263e28
Support python 3.12
james-choncholas May 2, 2024
418c823
Op kernels are stateless and support shape inference.
james-choncholas May 2, 2024
aa15e16
Shell types extend tf ExtensionType.
james-choncholas May 6, 2024
9446794
Tests and examples use autograph for shell ops.
james-choncholas May 8, 2024
7cc3ad6
Faster rotation test via profiling and removing redundant tests.
james-choncholas May 8, 2024
e876268
Shell ops perform broadcasting without relying on tf.broadcast_to().
james-choncholas May 13, 2024
f5aff3e
Ring formatters.
james-choncholas May 13, 2024
c4a5222
HE-specific graph based optimizations.
james-choncholas May 17, 2024
32bfc00
Remove duplicate dtype.
james-choncholas May 19, 2024
7000d43
Broadcast to flat tensors templated based on tensor dtype.
james-choncholas May 21, 2024
5ada2a6
Broadcast over dimension 0 and mul uses faster fused op.
james-choncholas May 21, 2024
c90b208
Dropout layer.
james-choncholas May 21, 2024
9aae9c0
Embedding layer supporting encrypted backprop.
james-choncholas May 23, 2024
43da433
Simplify ml tests and examples.
james-choncholas May 29, 2024
f533b16
tf_shell supports broadcast_to.
james-choncholas Jun 10, 2024
829d8cf
BinaryCrossentropy loss function.
james-choncholas Jun 10, 2024
c7e13a2
Op level broadcasting does not require copy.
james-choncholas Jun 10, 2024
f6f9e50
Rerun examples with new op broadcasting.
james-choncholas Jun 11, 2024
cf0c776
Bump version to 0.1.3
james-choncholas Jun 11, 2024
f225b2a
Bump the pip group across 1 directory with 7 updates
dependabot[bot] Jul 15, 2024
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
5 changes: 0 additions & 5 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,13 @@ build -c opt
build --cxxopt='-std=c++17'
build --cxxopt='-D_GLIBCXX_USE_CXX11_ABI=1'

build:test --cxxopt='-DPYBIND11_ABSEIL_STATUS_MODULE_PATH=pybind11_abseil.pybind11_abseil.status'

build:release --cxxopt='-DPYBIND11_ABSEIL_STATUS_MODULE_PATH=pybind11_abseil.status'

# If there are compilation issues with asan and absl, try making the changes
# described by:
# https://github.com/abseil/abseil-cpp/pull/1399/files#diff-32cf2e2d37473ed6eb8f8b7e1126983fcca9a5fe02885098094c9ed4ceda8a6f
build:asan --strip=never
build:asan --copt -O1
build:asan --copt -g
build:asan --copt -fno-omit-frame-pointer
build:asan --cxxopt='-DPYBIND11_ABSEIL_STATUS_MODULE_PATH=pybind11_abseil.pybind11_abseil.status'
# Sanitizers don't work with absl::string at version 20230802.1.
#build:asan --copt -fsanitize=address
#build:asan --linkopt -fsanitize=address
Expand Down
15 changes: 3 additions & 12 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,22 @@
}
},

// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-python.python",
"ms-vscode.cpptools-extension-pack",
"BazelBuild.vscode-bazel",
"minherz.copyright-inserter",
"DavidAnson.vscode-markdownlint",
"yzhang.markdown-all-in-one",
"ms-python.black-formatter"
"ms-python.black-formatter",
"ms-toolsai.jupyter",
"ms-toolsai.tensorboard"
]
}
},

"mounts": [ "source=/tmp,target=/tmp,type=bind,consistency=cached" ],

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
//"postCreateCommand": "echo hi",
// Uncomment when using a ptrace-based debugger like C++, Go, and Rust
// "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],
// Set `remoteUser` to `root` to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
}
7 changes: 4 additions & 3 deletions .github/workflows/wheel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,19 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
#os: [ubuntu-latest, windows-2019, macOS-11]
#os: [ubuntu-latest, windows-latest, macOS-12]
os: [ubuntu-latest]
python-version: ["3.9", "3.10", "3.11"] # Also see MODULE.bazel
python-version: ["3.9", "3.10", "3.11", "3.12"] # Also see MODULE.bazel

steps:
- uses: actions/checkout@v4

- name: Build wheel
shell: bash
run: |
sed -i 's/DEFAULT_PYTHON = "3.10"/DEFAULT_PYTHON = "${{ matrix.python-version }}"/' ./MODULE.bazel
sed -i 's/DEFAULT_PYTHON = "3.10"/DEFAULT_PYTHON = "${{ matrix.python-version }}"/' ./BUILD
bazelisk build --config release //:wheel
bazelisk build //:wheel
bazelisk run //:wheel_rename

- uses: actions/upload-artifact@v3
Expand Down
19 changes: 16 additions & 3 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ load("@buildifier_prebuilt//:rules.bzl", "buildifier")
load("@pip//:requirements.bzl", "requirement")
load("@python_versions//3.10:defs.bzl", compile_pip_requirements_3_10 = "compile_pip_requirements")
load("@python_versions//3.11:defs.bzl", compile_pip_requirements_3_11 = "compile_pip_requirements")
load("@python_versions//3.12:defs.bzl", compile_pip_requirements_3_12 = "compile_pip_requirements")
load("@python_versions//3.9:defs.bzl", compile_pip_requirements_3_9 = "compile_pip_requirements")
load("@rules_python//python:defs.bzl", "py_binary")
load("@rules_python//python:packaging.bzl", "py_wheel")
Expand All @@ -15,6 +16,7 @@ exports_files([
"requirements_3_9.txt",
"requirements_3_10.txt",
"requirements_3_11.txt",
"requirements_3_12.txt",
"README.md",
"DESCRIPTION.md",
])
Expand Down Expand Up @@ -43,6 +45,14 @@ compile_pip_requirements_3_11(
visibility = ["//visibility:public"],
)

compile_pip_requirements_3_12(
name = "requirements_3_12",
extra_args = ["--allow-unsafe"], # need setuptools
requirements_in = "//:requirements.in",
requirements_txt = "//:requirements_3_12.txt",
visibility = ["//visibility:public"],
)

buildifier(
name = "bazel_formatter",
exclude_patterns = [
Expand Down Expand Up @@ -92,7 +102,7 @@ py_wheel(
name = "wheel",
abi = "ABI",
author = "Google Inc.",
author_email = "jchoncholas@google.com",
author_email = "jchoncholas@gmail.com",
classifiers = [
"Topic :: Security :: Cryptography",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
Expand All @@ -115,10 +125,13 @@ py_wheel(
"@bazel_tools//src/conditions:linux_x86_64": "LINUX_x86_64",
"@bazel_tools//src/conditions:linux_aarch64": "LINUX_aarch64",
}),
python_requires = "==" + DEFAULT_PYTHON + ".*",
python_requires = ">=3.9",
python_tag = "INTERPRETER",
requires = ["tensorflow-cpu==2.16.1"], # See also: requirements.in.
summary = "TF-Shell: Privacy preserving machine learning with Tensorflow and the SHELL encryption library",
# The summary is tailored for each python version because PyPI prevents
# wheel uploads for different versions which have the same contents.
# Changing the summary is sufficient to allow re-uploads.
summary = "TF-Shell: Privacy preserving machine learning with Tensorflow and the SHELL encryption library, built for python " + DEFAULT_PYTHON + ".",
version = module_version(),
deps = [
"//tf_shell:tf_shell_pkg",
Expand Down
3 changes: 2 additions & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
module(
name = "tf-shell",
version = "0.1.2",
version = "0.1.3",
)

SUPPORTED_PYTHON_VERSIONS = [
"3.9",
"3.10",
"3.11",
"3.12",
] # Also see ./.github/workflows/wheel.yaml

DEFAULT_PYTHON = "3.10" # Also see ./BUILD
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ the labels.
2. Run the tests.

```bash
bazelisk test --config test ...
bazelisk test ...
```

3. Build the code.

```bash
bazelisk build --config release //:wheel
bazelisk build //:wheel
bazelisk run //:wheel_rename
```

Expand Down Expand Up @@ -95,7 +95,7 @@ Update requirements.in and run the following to update the requirements files
for each python version.

```bash
for ver in 3_9 3_10 3_11; do
for ver in 3_9 3_10 3_11 3_12; do
touch requirements_${ver}.txt
bazelisk run //:requirements_${ver}.update
done
Expand Down
1 change: 1 addition & 0 deletions examples/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tflogs
Loading
Loading