Skip to content
Closed

: lints #1709

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion hyperactor_mesh/examples/dining_philosophers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
7 changes: 4 additions & 3 deletions hyperactor_mesh/examples/test_bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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(
Expand Down Expand Up @@ -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();
Expand All @@ -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;
}
}
2 changes: 2 additions & 0 deletions hyperactor_telemetry/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,15 @@ const LOG_LEVEL_ERROR: &str = "error";

// Span field constants
const SPAN_FIELD_RECORDING: &str = "recording";
#[allow(dead_code)]
const SPAN_FIELD_RECORDER: &str = "recorder";

// Environment value constants
const ENV_VALUE_LOCAL: &str = "local";
const ENV_VALUE_MAST_EMULATOR: &str = "mast_emulator";
const ENV_VALUE_MAST: &str = "mast";
const ENV_VALUE_TEST: &str = "test";
#[allow(dead_code)]
const ENV_VALUE_LOCAL_MAST_SIMULATOR: &str = "local_mast_simulator";

pub mod in_memory_reader;
Expand Down
4 changes: 2 additions & 2 deletions hyperactor_telemetry/src/recorder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ impl Entry {
self.value = Value::String(buf);
}

fn set_debug(&mut self, name: &'static str, value: &(dyn std::fmt::Debug)) {
fn set_debug(&mut self, name: &'static str, value: &dyn std::fmt::Debug) {
self.reset();
let mut buf = self.buffer.take().unwrap_or_else(String::new);

Expand Down Expand Up @@ -325,7 +325,7 @@ impl Visit for Event {
self.next_field().set_error(field.name(), value);
}

fn record_debug(&mut self, field: &tracing::field::Field, value: &(dyn std::fmt::Debug)) {
fn record_debug(&mut self, field: &tracing::field::Field, value: &dyn std::fmt::Debug) {
self.next_field().set_debug(field.name(), value);
}
}
Expand Down
2 changes: 1 addition & 1 deletion monarch_extension/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ impl ClientActor {
}

#[staticmethod]
fn new_with_parent(proc: &PyProc, parent: &PyActorId) -> PyResult<Self> {
fn new_with_parent(_proc: &PyProc, _parent: &PyActorId) -> PyResult<Self> {
// XXX:
unimplemented!("this is not a valid thing to do!");
// Ok(Self {
Expand Down
2 changes: 0 additions & 2 deletions monarch_extension/src/mesh_controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions monarch_hyperactor/src/actor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion monarch_hyperactor/src/bootstrap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ pub fn bootstrap_main(py: Python) -> PyResult<Bound<PyAny>> {
}

#[pyfunction]
pub fn run_worker_loop_forever(py: Python<'_>, address: &str) -> PyResult<PyPythonTask> {
pub fn run_worker_loop_forever(_py: Python<'_>, address: &str) -> PyResult<PyPythonTask> {
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
Expand Down
3 changes: 1 addition & 2 deletions monarch_hyperactor/src/v1/actor_mesh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion monarch_rdma/src/rdma_manager_actor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 0 additions & 2 deletions monarch_types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 0 additions & 3 deletions torch-sys-cuda/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,10 @@ license = "BSD-3-Clause"
links = "torch_cuda"

[dependencies]
anyhow = "1.0.98"
async-trait = "0.1.86"
cxx = "1.0.119"
derive_more = { version = "1.0.0", features = ["full"] }
fxhash = "0.2.1"
nccl-sys = { path = "../nccl-sys" }
pyo3 = { version = "0.24", features = ["anyhow", "multiple-pymethods", "py-clone"] }
serde = { version = "1.0.219", features = ["derive", "rc"] }
thiserror = "2.0.12"
torch-sys = { version = "0.0.0", path = "../torch-sys" }
Expand Down