Skip to content

Commit 44210e0

Browse files
zdevitometa-codesync[bot]
authored andcommitted
Remove unused python bindings to rust objects (meta-pytorch#1975)
Summary: Pull Request resolved: meta-pytorch#1975 Only used in tests that basically tested whether the binding works, but we don't actually use the binding code. ghstack-source-id: 325392589 Reviewed By: dulinriley Differential Revision: D87675341 fbshipit-source-id: 262efd464ab4201dd505c7b42cdb6161bbdd00b2
1 parent ec8f2dd commit 44210e0

File tree

11 files changed

+9
-3404
lines changed

11 files changed

+9
-3404
lines changed

monarch_extension/src/client.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ use hyperactor_multiprocess::system_actor::SystemMessageClient;
2020
use hyperactor_multiprocess::system_actor::SystemSnapshotFilter;
2121
use hyperactor_multiprocess::system_actor::WorldSnapshot;
2222
use hyperactor_multiprocess::system_actor::WorldSnapshotProcInfo;
23+
use monarch_hyperactor::ndslice::PySlice;
2324
use monarch_hyperactor::proc::ControllerError;
2425
use monarch_hyperactor::proc::InstanceWrapper;
2526
use monarch_hyperactor::proc::PyActorId;
@@ -51,9 +52,14 @@ use pyo3::types::PyNone;
5152
use tokio::sync::Mutex;
5253
use torch_sys::RValue;
5354

54-
use crate::controller::PyRanks;
5555
use crate::convert::convert;
5656

57+
#[derive(Clone, FromPyObject)]
58+
pub enum PyRanks {
59+
Slice(PySlice),
60+
SliceList(Vec<PySlice>),
61+
}
62+
5763
#[pyclass(frozen, module = "monarch._rust_bindings.monarch_extension.client")]
5864
pub struct WorkerResponse {
5965
seq: Seq,

monarch_extension/src/controller.rs

Lines changed: 0 additions & 138 deletions
This file was deleted.

monarch_extension/src/lib.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
mod client;
1313
pub mod code_sync;
1414
#[cfg(feature = "tensor_engine")]
15-
mod controller;
16-
#[cfg(feature = "tensor_engine")]
1715
pub mod convert;
1816
#[cfg(feature = "tensor_engine")]
1917
mod debugger;
@@ -108,10 +106,6 @@ pub fn mod_init(module: &Bound<'_, PyModule>) -> PyResult<()> {
108106
module,
109107
"monarch_extension.tensor_worker",
110108
)?)?;
111-
controller::register_python_bindings(&get_or_add_new_module(
112-
module,
113-
"monarch_extension.controller",
114-
)?)?;
115109
debugger::register_python_bindings(&get_or_add_new_module(
116110
module,
117111
"monarch_extension.debugger",

0 commit comments

Comments
 (0)