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 #435

Merged
merged 1 commit into from
Dec 12, 2023
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
2 changes: 1 addition & 1 deletion bazel/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ SECRETFLOW_GIT = "https://github.com/secretflow"

YACL_COMMIT_ID = "6ba8bd5f02035176ec4daaca1c1269195a1b1b4e"

LIBSPI_COMMIT_ID = "575cb5999b5bc52926d08de6944e8d54f0a38f9f"
LIBSPI_COMMIT_ID = "dbf452b9d87619b40b73746b7c9afefc1845975b"

def spu_deps():
_rules_cuda()
Expand Down
3 changes: 2 additions & 1 deletion examples/python/ml/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ This directory contains examples demonstrating how to use SPU to write privacy-p
[Stax](https://jax.readthedocs.io/en/latest/jax.example_libraries.stax.html).
* [stax_mnist_classifier](stax_mnist_classifier/): Private training of a simple neural network for MNIST classification with
[Stax](https://jax.readthedocs.io/en/latest/jax.example_libraries.stax.html).
* [flax_resnet](flax_resnet/): Private training of a [ResNet](https://arxiv.org/abs/1512.03385) model with [Flax](https://github.com/google/flax) library, and private inference of a pre-trained ResNet-50 model based on [Microsoft-ResNet50](https://huggingface.co/microsoft/resnet-50).
* [flax_resnet](flax_resnet/): Private training of a [ResNet](https://arxiv.org/abs/1512.03385) model with [Flax](https://github.com/google/flax)
library, and private inference of a pre-trained ResNet-50 model based on [Microsoft-ResNet50](https://huggingface.co/microsoft/resnet-50).
* [flax_gpt2](flax_gpt2/): Private inference of a pre-trained
[GPT2](https://cdn.openai.com/better-language-models/language_models_are_unsupervised_multitask_learners.pdf)
model with [Flax](https://github.com/google/flax) library.
Expand Down
2 changes: 1 addition & 1 deletion spu/pir.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

from typing import List

from . import libspu # type: ignore
from .libspu.link import Context # type: ignore
from . import libpsi # type: ignore
from .pir_pb2 import ( # type: ignore
KvStoreType,
Expand Down
7 changes: 4 additions & 3 deletions spu/psi.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@

from typing import List

from . import libspu # type: ignore
from .libspu.link import Context # type: ignore
from .libpsi.libs import ProgressData
from . import libpsi # type: ignore
from .psi_pb2 import ( # type: ignore
BucketPsiConfig,
Expand All @@ -30,13 +31,13 @@


def mem_psi(
link: libspu.link.Context, config: MemoryPsiConfig, input_items: List[str]
link: Context, config: MemoryPsiConfig, input_items: List[str]
) -> List[str]:
return libpsi.libs.mem_psi(link, config.SerializeToString(), input_items)


def bucket_psi(
link: libspu.link.Context,
link: Context,
config: BucketPsiConfig,
progress_callbacks: [[libpsi.libs.ProgressData], None] = None,
callbacks_interval_ms: int = 5 * 1000,
Expand Down
Loading