Skip to content

Commit

Permalink
repo-sync-2023-12-12T14:27:43+0800
Browse files Browse the repository at this point in the history
  • Loading branch information
anakinxc committed Dec 12, 2023
1 parent 9f6d31b commit 05cafcd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
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

0 comments on commit 05cafcd

Please sign in to comment.