Skip to content

Commit

Permalink
Remove debug prints
Browse files Browse the repository at this point in the history
  • Loading branch information
pentschev committed Sep 30, 2024
1 parent 8ca07cd commit c7fdf1d
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions python/distributed-ucxx/distributed_ucxx/ucxx.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ def _stop_notifier_thread_and_progress_tasks():
"""
ctx = ucxx.core._get_ctx()
if len(ctx._dask_resources) == 0:
print(f"[{os.getpid()}] _stop_notifier_thread_and_progress_tasks", flush=True)
ucxx.stop_notifier_thread()
ucxx.core._get_ctx().progress_tasks.clear()

Expand All @@ -117,7 +116,6 @@ def _register_dask_resource(resource, name=None):

with ctx._dask_resources_lock:
ctx._dask_resources.add(resource)
print(f"[{os.getpid()}] {name} registered: {ctx._dask_resources=}", flush=True)


def _deregister_dask_resource(resource, name=None):
Expand All @@ -132,19 +130,15 @@ def _deregister_dask_resource(resource, name=None):

ctx = ucxx.core._get_ctx()

# Check if the attribute exists first, in tests the UCXX context may have
# been reset before some resources are deregistered.
if hasattr(ctx, "_dask_resources_lock"):
with ctx._dask_resources_lock:
try:
ctx._dask_resources.remove(resource)
except KeyError:
pass
_stop_notifier_thread_and_progress_tasks()
print(f"[{os.getpid()}] {name} deregistered: {ctx._dask_resources=}")
else:
print(
f"[{os.getpid()}] {name}: {ctx=} has no _dask_resources_lock, "
"the context was probably already reset."
)


def _allocate_dask_resources_tracker() -> None:
Expand All @@ -161,10 +155,6 @@ def _allocate_dask_resources_tracker() -> None:

ctx._dask_resources = set()
ctx._dask_resources_lock = Lock()
print(
f"[{os.getpid()}] init_once: {ctx=}, {ctx._dask_resources}, "
f"{ctx.progress_tasks=}, {ctx.notifier_thread=}"
)


def init_once():
Expand Down

0 comments on commit c7fdf1d

Please sign in to comment.