tf-models-nightly 2.17.0.dev20240624__py2.py3-none-any.whl → 2.17.0.dev20240625__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- official/common/distribute_utils.py +26 -2
- {tf_models_nightly-2.17.0.dev20240624.dist-info → tf_models_nightly-2.17.0.dev20240625.dist-info}/METADATA +1 -1
- {tf_models_nightly-2.17.0.dev20240624.dist-info → tf_models_nightly-2.17.0.dev20240625.dist-info}/RECORD +7 -7
- {tf_models_nightly-2.17.0.dev20240624.dist-info → tf_models_nightly-2.17.0.dev20240625.dist-info}/AUTHORS +0 -0
- {tf_models_nightly-2.17.0.dev20240624.dist-info → tf_models_nightly-2.17.0.dev20240625.dist-info}/LICENSE +0 -0
- {tf_models_nightly-2.17.0.dev20240624.dist-info → tf_models_nightly-2.17.0.dev20240625.dist-info}/WHEEL +0 -0
- {tf_models_nightly-2.17.0.dev20240624.dist-info → tf_models_nightly-2.17.0.dev20240625.dist-info}/top_level.txt +0 -0
@@ -148,8 +148,32 @@ def get_distribution_strategy(distribution_strategy="mirrored",
|
|
148
148
|
|
149
149
|
if distribution_strategy == "tpu":
|
150
150
|
# When tpu_address is an empty string, we communicate with local TPUs.
|
151
|
-
|
152
|
-
|
151
|
+
# Bug workaround that in v5p we need to explicitly specify the device
|
152
|
+
# assignment when using tpu strategy, adding device assignment to the
|
153
|
+
# strategy.
|
154
|
+
cluster_resolver = tf.distribute.cluster_resolver.TPUClusterResolver(
|
155
|
+
tpu=tpu_address
|
156
|
+
)
|
157
|
+
if tpu_address not in ("", "local"):
|
158
|
+
tf.config.experimental_connect_to_cluster(cluster_resolver)
|
159
|
+
topology = tf.tpu.experimental.initialize_tpu_system(cluster_resolver)
|
160
|
+
|
161
|
+
device_assignment = None
|
162
|
+
if hasattr(tf.tpu.experimental, "HardWareFeature"):
|
163
|
+
hardware_feature = tf.tpu.experimental.HardWareFeature(
|
164
|
+
cluster_resolver.tpu_hardware_feature
|
165
|
+
)
|
166
|
+
if (
|
167
|
+
hardware_feature.embedding_feature
|
168
|
+
== tf.tpu.experimental.HardwareFeature.EmbeddingFeature.V2
|
169
|
+
):
|
170
|
+
tpu_metadata = cluster_resolver.get_tpu_system_metadata()
|
171
|
+
device_assignment = tf.tpu.experimental.DeviceAssignment.build(
|
172
|
+
topology, num_replicas=tpu_metadata.num_cores
|
173
|
+
)
|
174
|
+
|
175
|
+
return tf.distribute.TPUStrategy(
|
176
|
+
cluster_resolver, experimental_device_assignment=device_assignment)
|
153
177
|
|
154
178
|
if distribution_strategy == "multi_worker_mirrored":
|
155
179
|
return tf.distribute.experimental.MultiWorkerMirroredStrategy(
|
@@ -1,7 +1,7 @@
|
|
1
1
|
official/__init__.py,sha256=7oiypy0N82PDw9aSdcJBLVoGTd_oRSUOdvuJhMv4leQ,609
|
2
2
|
official/common/__init__.py,sha256=Yqe5TjLrAR68lQ5G781dwlbbT6mELRByDipCtr4jQY4,610
|
3
3
|
official/common/dataset_fn.py,sha256=MSRNhNGvMnZtjkuxFIZ90vGJgKlr2JeGaEYpz82Y3Ew,1858
|
4
|
-
official/common/distribute_utils.py,sha256=
|
4
|
+
official/common/distribute_utils.py,sha256=dEciUuyBsxfv6T9rvPk_5zcvLyDFv0lPkhkFvyOGe_0,9575
|
5
5
|
official/common/distribute_utils_test.py,sha256=ltR8wrIbfoX1miJElPQzZN2aioKX6Hx8-mfzoo-_WGc,4914
|
6
6
|
official/common/flags.py,sha256=weXgDeMK7tZ8eY8d5LgMLRQDJYuu2hrJF-XfpOqOP34,4579
|
7
7
|
official/common/registry_imports.py,sha256=ez-j0sOvVyYBHHGM5hNjTF0jqHUbHI0zv-4SHe_AZ4s,843
|
@@ -1212,9 +1212,9 @@ tensorflow_models/tensorflow_models_test.py,sha256=nc6A9K53OGqF25xN5St8EiWvdVbda
|
|
1212
1212
|
tensorflow_models/nlp/__init__.py,sha256=4tA5Pf4qaFwT-fIFOpX7x7FHJpnyJT-5UgOeFYTyMlc,807
|
1213
1213
|
tensorflow_models/uplift/__init__.py,sha256=mqfa55gweOdpKoaQyid4A_4u7xw__FcQeSIF0k_pYmI,999
|
1214
1214
|
tensorflow_models/vision/__init__.py,sha256=zBorY_v5xva1uI-qxhZO3Qh-Dii-Suq6wEYh6hKHDfc,833
|
1215
|
-
tf_models_nightly-2.17.0.
|
1216
|
-
tf_models_nightly-2.17.0.
|
1217
|
-
tf_models_nightly-2.17.0.
|
1218
|
-
tf_models_nightly-2.17.0.
|
1219
|
-
tf_models_nightly-2.17.0.
|
1220
|
-
tf_models_nightly-2.17.0.
|
1215
|
+
tf_models_nightly-2.17.0.dev20240625.dist-info/AUTHORS,sha256=1dG3fXVu9jlo7bul8xuix5F5vOnczMk7_yWn4y70uw0,337
|
1216
|
+
tf_models_nightly-2.17.0.dev20240625.dist-info/LICENSE,sha256=WxeBS_DejPZQabxtfMOM_xn8qoZNJDQjrT7z2wG1I4U,11512
|
1217
|
+
tf_models_nightly-2.17.0.dev20240625.dist-info/METADATA,sha256=Qb7qjl8ts2IRPIuVgb36BPCqLxcU313XHjrUd3l6vc0,1432
|
1218
|
+
tf_models_nightly-2.17.0.dev20240625.dist-info/WHEEL,sha256=kGT74LWyRUZrL4VgLh6_g12IeVl_9u9ZVhadrgXZUEY,110
|
1219
|
+
tf_models_nightly-2.17.0.dev20240625.dist-info/top_level.txt,sha256=gum2FfO5R4cvjl2-QtP-S1aNmsvIZaFFT6VFzU0f4-g,33
|
1220
|
+
tf_models_nightly-2.17.0.dev20240625.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|