Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions pathwaysutils/elastic/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,20 +214,6 @@ def scale_by_active_slices(self, x: int | float) -> int | float:
else:
raise ValueError(f"Unsupported type: {type(x)=}")

def _cleanup_on_retry(self):
"""Cleans up JAX caches and traces on retry."""
try:
_logger.debug("Cleaning up any ongoing traces")
jax.profiler.stop_trace()
except (RuntimeError, ValueError):
_logger.debug("No ongoing traces to clean up")
except Exception: # pylint: disable=broad-exception-caught
_logger.exception("Error cleaning up ongoing traces")

jax.clear_caches()
for array in jax.live_arrays():
array.delete()

def _check_inactive_slices(self) -> None:
"""Checks inactive slices and updates available_inactive_slices."""
if not self.inactive_slice_indices:
Expand Down
Loading