Skip to content

Commit 970c7a5

Browse files
amirafzalifacebook-github-bot
authored andcommitted
migrate existing set_logging_level callsites
Summary: **Diff Purpose & Changes** Same as D72941480, but for set_worker_logging_level Reviewed By: colin2328 Differential Revision: D72942837 fbshipit-source-id: 83115a6915ec353fb295f72baf6285dcc45fa24a
1 parent 3aa8c4d commit 970c7a5

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

python/monarch/worker/worker.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,6 @@
5454
CONTROLLER_COMPILED_REPEAT = True
5555

5656

57-
def set_worker_logging_level(level):
58-
logger.setLevel(level)
59-
60-
6157
def set_random_seed_impl(seed, process_idx):
6258
torch.manual_seed(seed ^ process_idx)
6359

python/tests/dispatch_bench.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77

88
# this function helps get a local device mesh for testing
99
from monarch._testing import mock_mesh
10+
from monarch.builtins.log import set_logging_level_remote
1011

1112
from monarch.common._coalescing import coalescing
1213
from monarch.common.remote import remote
1314
from monarch.fetch import fetch_shard
1415
from monarch.python_local_mesh import python_local_mesh
1516
from monarch_supervisor.logging import initialize_logging
16-
1717
from tests.dispatch_bench_helper import run_loop, run_loop_local
1818

1919
NITER = 10000
@@ -25,10 +25,6 @@
2525
# user-defined remote functions
2626
log = remote("monarch.worker._testing_function.log", propagate="inspect")
2727

28-
set_worker_logging_level = remote(
29-
"monarch.worker.worker.set_worker_logging_level", propagate="inspect"
30-
)
31-
3228

3329
def local_run():
3430
run_loop_local(NITER, DEFAULT_TENSOR_SIZE)
@@ -66,7 +62,7 @@ def main():
6662

6763
with device_mesh.activate():
6864
torch.set_default_device("cuda")
69-
set_worker_logging_level(logging.WARNING)
65+
set_logging_level_remote(logging.WARNING)
7066

7167
# bench 1: local compute only
7268
t0 = benchmark.Timer(

0 commit comments

Comments
 (0)