pathwaysutils 0.1.12__tar.gz → 0.1.13__tar.gz
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.
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/PKG-INFO +2 -2
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/__init__.py +1 -1
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/elastic/manager.py +8 -7
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/experimental/gke/jobset.py +581 -134
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/experimental/shared_pathways_service/deploy_pathways_service.py +49 -70
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/experimental/shared_pathways_service/gke_utils.py +325 -10
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/experimental/shared_pathways_service/isc_pathways.py +17 -40
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/experimental/shared_pathways_service/run_workload.py +10 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/experimental/shared_pathways_service/validators.py +85 -57
- pathwaysutils-0.1.13/pathwaysutils/extras/elastic/model_comparison.html +2052 -0
- pathwaysutils-0.1.13/pathwaysutils/extras/simple_model/__init__.py +48 -0
- pathwaysutils-0.1.13/pathwaysutils/extras/simple_model/compile.py +142 -0
- pathwaysutils-0.1.13/pathwaysutils/extras/simple_model/config.py +58 -0
- pathwaysutils-0.1.13/pathwaysutils/extras/simple_model/data.py +63 -0
- pathwaysutils-0.1.13/pathwaysutils/extras/simple_model/model.py +101 -0
- pathwaysutils-0.1.13/pathwaysutils/extras/simple_model/simple_model.py +78 -0
- pathwaysutils-0.1.13/pathwaysutils/extras/simple_model/simple_model_test.py +356 -0
- pathwaysutils-0.1.13/pathwaysutils/extras/simple_model/workload.py +219 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/profiling.py +110 -15
- pathwaysutils-0.1.13/pathwaysutils/test/experimental/gke/jobset_test.py +1723 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/test/experimental/shared_pathways_service/deploy_pathways_service_test.py +112 -35
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/test/experimental/shared_pathways_service/gke_utils_test.py +653 -1
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/test/experimental/shared_pathways_service/isc_pathways_test.py +128 -99
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/test/experimental/shared_pathways_service/run_workload_test.py +47 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/test/experimental/shared_pathways_service/validators_test.py +103 -21
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/test/profiling_test.py +131 -2
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pyproject.toml +1 -1
- pathwaysutils-0.1.12/pathwaysutils/test/experimental/gke/jobset_test.py +0 -850
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/LICENSE +0 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/README.md +0 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/_initialize.py +0 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/collect_profile.py +0 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/debug/__init__.py +0 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/debug/timing.py +0 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/debug/watchdog.py +0 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/elastic/__init__.py +0 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/elastic/elastic.py +0 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/experimental/__init__.py +0 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/experimental/concatenate_by_mesh_axis.py +0 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/experimental/gke/__init__.py +0 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/experimental/profiling.py +0 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/experimental/reshard.py +0 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/experimental/shared_pathways_service/README.md +0 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/experimental/shared_pathways_service/__init__.py +0 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/experimental/shared_pathways_service/dockerfiles/sample_sidecar.dockerfile +0 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/experimental/shared_pathways_service/metrics_collector.py +0 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/experimental/shared_pathways_service/run_connect_example.py +0 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/experimental/shared_pathways_service/start_vscode_on_cpu_np.py +0 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/experimental/shared_pathways_service/tpu_specs.py +0 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/experimental/shared_pathways_service/yamls/code-server.yaml +0 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/experimental/shared_pathways_service/yamls/pw-proxy.yaml +0 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/experimental/split_by_mesh_axis.py +0 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/jax/__init__.py +0 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/lru_cache.py +0 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/persistence/__init__.py +0 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/persistence/helper.py +0 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/plugin_executable.py +0 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/proxy_backend.py +0 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/reshard.py +0 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/test/__init__.py +0 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/test/debug/__init__.py +0 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/test/debug/timing_test.py +0 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/test/debug/watchdog_test.py +0 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/test/experimental/gke/testdata/model_lite_tpuv5e_4x8.yaml +0 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/test/experimental/reshard_test.py +0 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/test/experimental/shared_pathways_service/metrics_collector_test.py +0 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/test/experimental/shared_pathways_service/start_vscode_on_cpu_np_test.py +0 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/test/experimental/shared_pathways_service/tpu_specs_test.py +0 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/test/initialize_test.py +0 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/test/lru_cache_test.py +0 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/test/mock_fault_injection.py +0 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/test/mock_fault_injection_test.py +0 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/test/persistence_test.py +0 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/test/plugin_executable_test.py +0 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/test/proxy_backend_test.py +0 -0
- {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/test/reshard_test.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pathwaysutils
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.13
|
|
4
4
|
Summary: Package of Pathways-on-Cloud utilities.
|
|
5
5
|
Keywords:
|
|
6
6
|
Author-email: Pathways-on-Cloud Utilities Developers <pathwaysutils-dev@google.com>
|
|
@@ -10,7 +10,7 @@ Classifier: License :: OSI Approved :: Apache Software License
|
|
|
10
10
|
License-File: LICENSE
|
|
11
11
|
Requires-Dist: absl-py
|
|
12
12
|
Requires-Dist: fastapi
|
|
13
|
-
Requires-Dist: jax>=0.
|
|
13
|
+
Requires-Dist: jax>=0.10.0
|
|
14
14
|
Requires-Dist: orbax-checkpoint>=0.12.3
|
|
15
15
|
Requires-Dist: uvicorn
|
|
16
16
|
Requires-Dist: requests
|
|
@@ -52,7 +52,7 @@ RetryPolicy: TypeAlias = Callable[[int, Exception], bool]
|
|
|
52
52
|
|
|
53
53
|
|
|
54
54
|
def _elastic_event_cleanup() -> None:
|
|
55
|
-
"""
|
|
55
|
+
"""Stops any ongoing JAX profiler trace."""
|
|
56
56
|
try:
|
|
57
57
|
_logger.info("Cleaning up any ongoing traces")
|
|
58
58
|
jax.profiler.stop_trace()
|
|
@@ -62,10 +62,6 @@ def _elastic_event_cleanup() -> None:
|
|
|
62
62
|
_logger.exception("Error cleaning up ongoing traces")
|
|
63
63
|
raise
|
|
64
64
|
|
|
65
|
-
jax.clear_caches()
|
|
66
|
-
for array in jax.live_arrays():
|
|
67
|
-
array.delete()
|
|
68
|
-
|
|
69
65
|
|
|
70
66
|
class ElasticRetryLimit:
|
|
71
67
|
"""A retry callback that limits the number of attempts."""
|
|
@@ -299,8 +295,7 @@ class Manager:
|
|
|
299
295
|
|
|
300
296
|
This decorator wraps a function to automatically retry execution in case of
|
|
301
297
|
`jax.errors.JaxRuntimeError` caused by slice down events. It waits for
|
|
302
|
-
`minimum_slice_count` active slices before each attempt
|
|
303
|
-
caches on failure.
|
|
298
|
+
`minimum_slice_count` active slices before each attempt.
|
|
304
299
|
|
|
305
300
|
If `minimum_slice_count` is not met, the function will wait until at least
|
|
306
301
|
`minimum_slice_count` slices are active before execution. If
|
|
@@ -313,6 +308,12 @@ class Manager:
|
|
|
313
308
|
boundaries) and raise a `ScaleUpSignalError` to gracefully interrupt the
|
|
314
309
|
current execution and trigger a retry with the expanded hardware.
|
|
315
310
|
|
|
311
|
+
On an elastic event the arrays of the failed attempt are not deleted
|
|
312
|
+
explicitly; JAX frees them once the attempt has unwound and nothing
|
|
313
|
+
references them anymore. The wrapped function and the callbacks must not
|
|
314
|
+
keep references to them, or the memory stays allocated during the next
|
|
315
|
+
attempt.
|
|
316
|
+
|
|
316
317
|
Often, the function will dispatch JAX operations and wait for them to
|
|
317
318
|
complete while creating a log message. If using Python logging, it is
|
|
318
319
|
recommended to set `logging.raiseExceptions=True` to ensure that the
|