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.
Files changed (76) hide show
  1. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/PKG-INFO +2 -2
  2. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/__init__.py +1 -1
  3. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/elastic/manager.py +8 -7
  4. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/experimental/gke/jobset.py +581 -134
  5. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/experimental/shared_pathways_service/deploy_pathways_service.py +49 -70
  6. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/experimental/shared_pathways_service/gke_utils.py +325 -10
  7. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/experimental/shared_pathways_service/isc_pathways.py +17 -40
  8. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/experimental/shared_pathways_service/run_workload.py +10 -0
  9. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/experimental/shared_pathways_service/validators.py +85 -57
  10. pathwaysutils-0.1.13/pathwaysutils/extras/elastic/model_comparison.html +2052 -0
  11. pathwaysutils-0.1.13/pathwaysutils/extras/simple_model/__init__.py +48 -0
  12. pathwaysutils-0.1.13/pathwaysutils/extras/simple_model/compile.py +142 -0
  13. pathwaysutils-0.1.13/pathwaysutils/extras/simple_model/config.py +58 -0
  14. pathwaysutils-0.1.13/pathwaysutils/extras/simple_model/data.py +63 -0
  15. pathwaysutils-0.1.13/pathwaysutils/extras/simple_model/model.py +101 -0
  16. pathwaysutils-0.1.13/pathwaysutils/extras/simple_model/simple_model.py +78 -0
  17. pathwaysutils-0.1.13/pathwaysutils/extras/simple_model/simple_model_test.py +356 -0
  18. pathwaysutils-0.1.13/pathwaysutils/extras/simple_model/workload.py +219 -0
  19. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/profiling.py +110 -15
  20. pathwaysutils-0.1.13/pathwaysutils/test/experimental/gke/jobset_test.py +1723 -0
  21. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/test/experimental/shared_pathways_service/deploy_pathways_service_test.py +112 -35
  22. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/test/experimental/shared_pathways_service/gke_utils_test.py +653 -1
  23. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/test/experimental/shared_pathways_service/isc_pathways_test.py +128 -99
  24. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/test/experimental/shared_pathways_service/run_workload_test.py +47 -0
  25. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/test/experimental/shared_pathways_service/validators_test.py +103 -21
  26. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/test/profiling_test.py +131 -2
  27. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pyproject.toml +1 -1
  28. pathwaysutils-0.1.12/pathwaysutils/test/experimental/gke/jobset_test.py +0 -850
  29. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/LICENSE +0 -0
  30. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/README.md +0 -0
  31. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/_initialize.py +0 -0
  32. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/collect_profile.py +0 -0
  33. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/debug/__init__.py +0 -0
  34. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/debug/timing.py +0 -0
  35. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/debug/watchdog.py +0 -0
  36. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/elastic/__init__.py +0 -0
  37. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/elastic/elastic.py +0 -0
  38. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/experimental/__init__.py +0 -0
  39. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/experimental/concatenate_by_mesh_axis.py +0 -0
  40. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/experimental/gke/__init__.py +0 -0
  41. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/experimental/profiling.py +0 -0
  42. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/experimental/reshard.py +0 -0
  43. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/experimental/shared_pathways_service/README.md +0 -0
  44. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/experimental/shared_pathways_service/__init__.py +0 -0
  45. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/experimental/shared_pathways_service/dockerfiles/sample_sidecar.dockerfile +0 -0
  46. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/experimental/shared_pathways_service/metrics_collector.py +0 -0
  47. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/experimental/shared_pathways_service/run_connect_example.py +0 -0
  48. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/experimental/shared_pathways_service/start_vscode_on_cpu_np.py +0 -0
  49. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/experimental/shared_pathways_service/tpu_specs.py +0 -0
  50. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/experimental/shared_pathways_service/yamls/code-server.yaml +0 -0
  51. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/experimental/shared_pathways_service/yamls/pw-proxy.yaml +0 -0
  52. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/experimental/split_by_mesh_axis.py +0 -0
  53. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/jax/__init__.py +0 -0
  54. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/lru_cache.py +0 -0
  55. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/persistence/__init__.py +0 -0
  56. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/persistence/helper.py +0 -0
  57. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/plugin_executable.py +0 -0
  58. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/proxy_backend.py +0 -0
  59. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/reshard.py +0 -0
  60. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/test/__init__.py +0 -0
  61. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/test/debug/__init__.py +0 -0
  62. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/test/debug/timing_test.py +0 -0
  63. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/test/debug/watchdog_test.py +0 -0
  64. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/test/experimental/gke/testdata/model_lite_tpuv5e_4x8.yaml +0 -0
  65. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/test/experimental/reshard_test.py +0 -0
  66. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/test/experimental/shared_pathways_service/metrics_collector_test.py +0 -0
  67. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/test/experimental/shared_pathways_service/start_vscode_on_cpu_np_test.py +0 -0
  68. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/test/experimental/shared_pathways_service/tpu_specs_test.py +0 -0
  69. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/test/initialize_test.py +0 -0
  70. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/test/lru_cache_test.py +0 -0
  71. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/test/mock_fault_injection.py +0 -0
  72. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/test/mock_fault_injection_test.py +0 -0
  73. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/test/persistence_test.py +0 -0
  74. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/test/plugin_executable_test.py +0 -0
  75. {pathwaysutils-0.1.12 → pathwaysutils-0.1.13}/pathwaysutils/test/proxy_backend_test.py +0 -0
  76. {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.12
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.8.3
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
@@ -21,4 +21,4 @@ is_pathways_backend_used: Callable[[], bool] = _initialize.is_pathways_backend_u
21
21
  del _initialize
22
22
 
23
23
  # When changing this, also update the CHANGELOG.md.
24
- __version__ = "v0.1.12"
24
+ __version__ = "v0.1.13"
@@ -52,7 +52,7 @@ RetryPolicy: TypeAlias = Callable[[int, Exception], bool]
52
52
 
53
53
 
54
54
  def _elastic_event_cleanup() -> None:
55
- """Cleans up JAX profiles, caches, and live arrays."""
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 and cleans up JAX
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