Skip to content
Open
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions pathwaysutils/elastic/elastic.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@ def wait_for_slices(
TimeoutError: If the timeout is reached before the slices become
active.
"""
if poll_interval < 0:
raise ValueError(f"poll_interval must be non-negative, got {poll_interval}")
if timeout is not None and timeout < 0:
raise ValueError(f"timeout must be non-negative, got {timeout}")
if slice_to_devices is None:
_logger.debug("slice_to_devices is None. Getting from jax.devices().")
slice_to_devices = get_slice_to_devices(jax.devices())
Expand Down
5 changes: 4 additions & 1 deletion pathwaysutils/elastic/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,10 @@ def close(self) -> None:
pass
else:
raise
self._monitor_thread = None
finally:
self._monitor_thread = None
self._stop_event = None
else:
self._stop_event = None

@functools.cached_property
Expand Down
Loading