Skip to content

Commit

Permalink
Update dependencies and fix patch files for federated_language.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 712670487
  • Loading branch information
michaelreneer authored and copybara-github committed Jan 6, 2025
1 parent fead887 commit dfbf57b
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 14 deletions.
6 changes: 3 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ http_archive(
repo_mapping = {
"@protobuf": "@com_google_protobuf",
},
sha256 = "381beb686f509c229f2dcf23d209ba26881f38e5330d8d0c74a20b5a32dd5217",
strip_prefix = "federated-language-0438e827a361360897844fc7a9bfad790a453acd",
url = "https://github.com/google-parfait/federated-language/archive/0438e827a361360897844fc7a9bfad790a453acd.tar.gz",
sha256 = "d1500db4e6dc7403c3da121cf98ec03693b48384ec7cccae6fdc8ac3df182be0",
strip_prefix = "federated-language-be055feb0137577e0d27fe7c78aab87fbcb70b6d",
url = "https://github.com/google-parfait/federated-language/archive/be055feb0137577e0d27fe7c78aab87fbcb70b6d.tar.gz",
)

# The version of TensorFlow should match the version in
Expand Down
63 changes: 63 additions & 0 deletions third_party/federated_language/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Federated Language Patches

1. Clone the repository.

```shell
$ git clone https://github.com/google-parfait/federated-language.git "/tmp/federated-language"
$ cd "/tmp/federated-language"
```

1. Checkout the commit.

```shell
$ git checkout <COMMIT>
```

1. Create the `python_deps` patch.

1. Make the changes.

```shell
$ buildozer 'remove deps @pypi//absl_py' //...:*
$ buildozer 'remove deps @pypi//attrs' //...:*
$ buildozer 'remove deps @pypi//dm_tree' //...:*
$ buildozer 'remove deps @pypi//ml_dtypes' //...:*
$ buildozer 'remove deps @pypi//numpy' //...:*
$ buildozer 'remove deps @pypi//typing_extensions' //...:*
```

1. Confirm no more changes are required.

```shell
$ find "." -type f -print0 | xargs -0 grep "@pypi"
```

1. Create the patch.

```shell
$ git diff --no-prefix \
> "<CLIENT>/tensorflow_federated/third_party/federated_language/python_deps.patch"
```

1. Create the `structure_visibility` patch.

Note: This patch requires the previous patch to be applied.

1. Stage the changes from the previous step.

```shell
$ git add .
```

1. Make the changes.

```shell
$ buildozer 'add visibility //visibility:public' //federated_language/common_libs:structure
```

1. Create the patch.

```shell
$ git diff --no-prefix \
> "<CLIENT>/tensorflow_federated/third_party/federated_language/structure_visibility.patch"
```
13 changes: 2 additions & 11 deletions third_party/federated_language/python_deps.patch
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ index 709665c..17c84a6 100644
],
)
diff --git federated_language/types/BUILD federated_language/types/BUILD
index 310c932..182f2b5 100644
index a5bcb11..abe4c0b 100644
--- federated_language/types/BUILD
+++ federated_language/types/BUILD
@@ -53,7 +53,6 @@ py_test(
Expand Down Expand Up @@ -667,16 +667,7 @@ index 310c932..182f2b5 100644
],
)

@@ -240,8 +208,6 @@ py_test(
":type_serialization",
"//federated_language/proto:computation_py_pb2",
"//federated_language/proto:data_type_py_pb2",
- "@pypi//absl_py",
- "@pypi//numpy",
],
)

@@ -268,8 +234,6 @@ py_test(
@@ -243,8 +211,6 @@ py_test(
":computation_types",
":placements",
":type_transformations",
Expand Down

0 comments on commit dfbf57b

Please sign in to comment.