Skip to content

Commit 3d6632a

Browse files
pablorfb-metafacebook-github-bot
authored andcommitted
(1/n) Add file watcher (meta-pytorch#1464)
Summary: Currently Monarch sits in the middle of log forwarding, ie if Monarch crashes a child proc's logs would be lost. Here we add `LogFileMonitor`, which will be the replacement for `LogFileWriter` and `LogTailer`. `LogFileMonitor` enables "process spawners" to attach the monitor to specific files (e.g. a custom file where stdout/stderr are teed), which propagates updates to the provided `log_channel`. This will effectively move Monarch out of the critical path for logging, more context on [doc](https://docs.google.com/document/d/1TSrsFqlXRPEhKOyQhTKd1XyY9JrjLH6y_Z5iGnrnzBo/edit?tab=t.0#heading=h.vvg43v4o545o) - Enables creation of temp log files - Adds a file watcher that propagates updates on file modifications - Add missing logging tests Differential Revision: D84111031
1 parent 6c266bf commit 3d6632a

File tree

3 files changed

+423
-5
lines changed

3 files changed

+423
-5
lines changed

hyperactor_mesh/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ libc = "0.2.139"
6666
mockall = "0.13.1"
6767
ndslice = { version = "0.0.0", path = "../ndslice" }
6868
nix = { version = "0.30.1", features = ["dir", "event", "hostname", "inotify", "ioctl", "mman", "mount", "net", "poll", "ptrace", "reboot", "resource", "sched", "signal", "term", "time", "user", "zerocopy"] }
69+
notify = "5"
6970
opentelemetry = "0.29"
7071
pin-project = "1.1.10"
7172
preempt_rwlock = { version = "0.0.0", path = "../preempt_rwlock" }
@@ -87,6 +88,7 @@ bytes = { version = "1.10", features = ["serde"] }
8788
itertools = "0.14.0"
8889
maplit = "1.0"
8990
proptest = "1.5"
91+
tempfile = "3.22"
9092
timed_test = { version = "0.0.0", path = "../timed_test" }
9193
tracing-test = { version = "0.2.3", features = ["no-env-filter"] }
9294

0 commit comments

Comments
 (0)