Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
Signed-off-by: Qing Wang <kingchin1218@gmail.com>
  • Loading branch information
jovany-wang committed Jul 6, 2023
1 parent de63fb8 commit 85da72b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
1 change: 1 addition & 0 deletions fed/_private/global_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

from fed.cleanup import CleanupManager


class GlobalContext:
def __init__(self) -> None:
self._seq_count = 0
Expand Down
3 changes: 0 additions & 3 deletions fed/cleanup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import threading
import time
from collections import deque
from fed.utils import LockGuard

import ray

Expand Down Expand Up @@ -54,7 +53,6 @@ def _main_thread_monitor():
self._monitor_thread.start()
logger.info('Start check sending monitor thread.')


def _stop_gracefully(self):
assert self._check_send_thread is not None
self._notify_to_exit()
Expand All @@ -68,7 +66,6 @@ def _notify_to_exit(self):
def push_to_sending(self, obj_ref: ray.ObjectRef):
self._sending_obj_refs_q.append(obj_ref)


def _check_sending_objs(self):
def _signal_exit():
os.kill(os.getpid(), signal.SIGTERM)
Expand Down
9 changes: 1 addition & 8 deletions tests/test_repeat_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import multiprocessing

import pytest
import time
# import time
import fed
import fed._private.compatible_utils as compatible_utils
import ray
Expand Down Expand Up @@ -51,13 +51,6 @@ def _run():
# assert fed.cleanup._sending_obj_refs_q is None
compatible_utils.init_ray(address='local')
fed.init(cluster=cluster, party=party)
# _start_check_sending()
# time.sleep(0.5)
# assert fed.cleanup._sending_obj_refs_q is not None
# push_to_sending(True)
# # Slightly longer than the queue polling
# time.sleep(0.6)
# assert fed.cleanup._sending_obj_refs_q is None

my1 = My.party("alice").remote()
my2 = My.party("bob").remote()
Expand Down

0 comments on commit 85da72b

Please sign in to comment.