diff --git a/hyperactor_mesh/examples/dining_philosophers.rs b/hyperactor_mesh/examples/dining_philosophers.rs index 48f8a15c3..2106d6b68 100644 --- a/hyperactor_mesh/examples/dining_philosophers.rs +++ b/hyperactor_mesh/examples/dining_philosophers.rs @@ -23,7 +23,6 @@ use hyperactor::Named; use hyperactor::PortRef; use hyperactor::Unbind; use hyperactor::context; -use hyperactor_mesh::bootstrap::BootstrapCommand; use hyperactor_mesh::comm::multicast::CastInfo; use hyperactor_mesh::extent; use hyperactor_mesh::proc_mesh::global_root_client; diff --git a/hyperactor_mesh/examples/test_bench.rs b/hyperactor_mesh/examples/test_bench.rs index 71fdbe9c5..95dc66b5e 100644 --- a/hyperactor_mesh/examples/test_bench.rs +++ b/hyperactor_mesh/examples/test_bench.rs @@ -22,6 +22,8 @@ use hyperactor::Handler; use hyperactor::Named; use hyperactor::PortRef; use hyperactor::Unbind; +use hyperactor::clock::Clock; +use hyperactor::clock::RealClock; use hyperactor_mesh::bootstrap::BootstrapCommand; use hyperactor_mesh::comm::multicast::CastInfo; use hyperactor_mesh::proc_mesh::global_root_client; @@ -31,7 +33,6 @@ use ndslice::ViewExt; use ndslice::extent; use serde::Deserialize; use serde::Serialize; -use tokio::time::Instant; #[derive(Actor, Default, Debug)] #[hyperactor::export( @@ -84,7 +85,7 @@ async fn main() { loop { let mut received = HashSet::new(); let (port, mut rx) = instance.open_port(); - let begin = Instant::now(); + let begin = RealClock.now(); actor_mesh .cast(instance, TestMessage::Ping(port.bind())) .unwrap(); @@ -93,6 +94,6 @@ async fn main() { } eprintln!("ping {}ms", begin.elapsed().as_millis()); - tokio::time::sleep(Duration::from_secs(1)).await; + RealClock.sleep(Duration::from_secs(1)).await; } } diff --git a/monarch_extension/src/client.rs b/monarch_extension/src/client.rs index b1f92a01e..a743c2b96 100644 --- a/monarch_extension/src/client.rs +++ b/monarch_extension/src/client.rs @@ -578,7 +578,7 @@ impl ClientActor { } #[staticmethod] - fn new_with_parent(proc: &PyProc, parent: &PyActorId) -> PyResult { + fn new_with_parent(_proc: &PyProc, _parent: &PyActorId) -> PyResult { // XXX: unimplemented!("this is not a valid thing to do!"); // Ok(Self { diff --git a/monarch_extension/src/mesh_controller.rs b/monarch_extension/src/mesh_controller.rs index f47363821..ed28bd622 100644 --- a/monarch_extension/src/mesh_controller.rs +++ b/monarch_extension/src/mesh_controller.rs @@ -30,7 +30,6 @@ use hyperactor::Handler; use hyperactor::Instance; use hyperactor::PortRef; use hyperactor::ProcId; -use hyperactor::actor::ActorStatus; use hyperactor::context; use hyperactor::mailbox::MailboxSenderError; use hyperactor_mesh::Mesh; @@ -69,7 +68,6 @@ use monarch_tensor_worker::WorkerActor; use ndslice::Slice; use ndslice::ViewExt; use ndslice::selection::ReifySlice; -use pyo3::exceptions::PyRuntimeError; use pyo3::exceptions::PyValueError; use pyo3::prelude::*; use tokio::sync::Mutex; diff --git a/monarch_hyperactor/src/actor.rs b/monarch_hyperactor/src/actor.rs index 7a15350d1..e3c0832af 100644 --- a/monarch_hyperactor/src/actor.rs +++ b/monarch_hyperactor/src/actor.rs @@ -49,8 +49,6 @@ use serde::Serialize; use serde_bytes::ByteBuf; use serde_multipart::Part; use tokio::sync::Mutex; -use tokio::sync::mpsc::UnboundedReceiver; -use tokio::sync::mpsc::UnboundedSender; use tokio::sync::oneshot; use tracing::Instrument; diff --git a/monarch_hyperactor/src/bootstrap.rs b/monarch_hyperactor/src/bootstrap.rs index f10d3fe6d..0188d6b94 100644 --- a/monarch_hyperactor/src/bootstrap.rs +++ b/monarch_hyperactor/src/bootstrap.rs @@ -48,7 +48,7 @@ pub fn bootstrap_main(py: Python) -> PyResult> { } #[pyfunction] -pub fn run_worker_loop_forever(py: Python<'_>, address: &str) -> PyResult { +pub fn run_worker_loop_forever(_py: Python<'_>, address: &str) -> PyResult { let addr = ChannelAddr::from_zmq_url(address)?; // Check if we're running in a PAR/XAR build by looking for FB_XAR_INVOKED_NAME environment variable diff --git a/monarch_hyperactor/src/v1/actor_mesh.rs b/monarch_hyperactor/src/v1/actor_mesh.rs index 38abc5ade..d9d827803 100644 --- a/monarch_hyperactor/src/v1/actor_mesh.rs +++ b/monarch_hyperactor/src/v1/actor_mesh.rs @@ -45,7 +45,6 @@ use pyo3::exceptions::PyValueError; use pyo3::prelude::*; use pyo3::types::PyBytes; use tokio::sync::watch; -use tokio::task::JoinHandle; use tokio_util::sync::CancellationToken; use crate::actor::PythonActor; @@ -305,7 +304,7 @@ impl PythonActorMeshImpl { let (sender, receiver) = watch::channel(None); let cancel = CancellationToken::new(); let canceled = cancel.clone(); - let task = get_tokio_runtime().spawn(async move { + let _task = get_tokio_runtime().spawn(async move { // 3 seconds is chosen to not penalize short-lived successful calls, // while still able to catch issues before they look like a hang or timeout. let time_between_checks = tokio::time::Duration::from_secs(3); diff --git a/monarch_rdma/src/rdma_manager_actor.rs b/monarch_rdma/src/rdma_manager_actor.rs index 770aec1a8..8e7638238 100644 --- a/monarch_rdma/src/rdma_manager_actor.rs +++ b/monarch_rdma/src/rdma_manager_actor.rs @@ -234,7 +234,7 @@ impl Drop for RdmaManagerActor { } // 3. Clean up memory regions - let mr_count = self.mr_map.len(); + let _mr_count = self.mr_map.len(); for (id, mr_ptr) in self.mr_map.drain() { if mr_ptr != 0 { unsafe { diff --git a/monarch_types/src/lib.rs b/monarch_types/src/lib.rs index 08b827d0d..0a676109b 100644 --- a/monarch_types/src/lib.rs +++ b/monarch_types/src/lib.rs @@ -12,8 +12,6 @@ mod pyobject; mod python; mod pytree; -use std::error::Error; - use pyo3::PyErr; use pyo3::exceptions::PyValueError; pub use pyobject::PickledPyObject;