Skip to content

[monarch] fold hyperactor_extension into monarch_hyperactor #464

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: gh/suo/53/base
Choose a base branch
from
Open
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
3 changes: 2 additions & 1 deletion actor_extension/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ crate-type = ["cdylib"]
anyhow = "1.0.98"
bincode = "1.3.3"
hyperactor = { version = "0.0.0", path = "../hyperactor" }
hyperactor_extension = { version = "0.0.0", path = "../hyperactor_extension" }
hyperactor_mesh = { version = "0.0.0", path = "../hyperactor_mesh" }
hyperactor_telemetry = { version = "0.0.0", path = "../hyperactor_telemetry" }
libc = "0.2.139"
monarch_hyperactor = { version = "0.0.0", path = "../monarch_hyperactor" }
pyo3 = { version = "0.24", features = ["anyhow", "multiple-pymethods"] }
pyo3-async-runtimes = { version = "0.24", features = ["attributes", "tokio-runtime"] }
serde = { version = "1.0.185", features = ["derive", "rc"] }
tokio = { version = "1.45.0", features = ["full", "test-util", "tracing"] }
tracing = { version = "0.1.41", features = ["attributes", "valuable"] }
10 changes: 2 additions & 8 deletions actor_extension/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ use pyo3::prelude::*;
mod blocking;
mod code_sync;
mod panic;
mod telemetry;

#[cfg(fbcode_build)]
mod meta;
Expand Down Expand Up @@ -105,14 +106,7 @@ pub fn mod_init(module: &Bound<'_, PyModule>) -> PyResult<()> {
module,
"monarch_hyperactor.runtime",
)?)?;
hyperactor_extension::alloc::register_python_bindings(&get_or_add_new_module(
module,
"hyperactor_extension.alloc",
)?)?;
hyperactor_extension::telemetry::register_python_bindings(&get_or_add_new_module(
module,
"hyperactor_extension.telemetry",
)?)?;
telemetry::register_python_bindings(&get_or_add_new_module(module, "telemetry")?)?;
crate::panic::register_python_bindings(&get_or_add_new_module(module, "panic")?)?;

crate::blocking::register_python_bindings(&get_or_add_new_module(module, "blocking")?)?;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ pub fn use_sim_clock() -> PyResult<()> {
#[pyclass(
unsendable,
subclass,
module = "monarch._src.actor._extension.hyperactor_extension.telemetry"
module = "monarch._src.actor._extension.telemetry"
)]
struct PySpan {
span: tracing::span::EnteredSpan,
Expand All @@ -140,46 +140,28 @@ use pyo3::types::PyModule;
pub fn register_python_bindings(module: &Bound<'_, PyModule>) -> PyResult<()> {
// Register the forward_to_tracing function
let f = wrap_pyfunction!(forward_to_tracing, module)?;
f.setattr(
"__module__",
"monarch._src.actor._extension.hyperactor_extension.telemetry",
)?;
f.setattr("__module__", "monarch._src.actor._extension.telemetry")?;
module.add_function(f)?;

// Register the span-related functions
let enter_span_fn = wrap_pyfunction!(enter_span, module)?;
enter_span_fn.setattr(
"__module__",
"monarch._src.actor._extension.hyperactor_extension.telemetry",
)?;
enter_span_fn.setattr("__module__", "monarch._src.actor._extension.telemetry")?;
module.add_function(enter_span_fn)?;

let exit_span_fn = wrap_pyfunction!(exit_span, module)?;
exit_span_fn.setattr(
"__module__",
"monarch._src.actor._extension.hyperactor_extension.telemetry",
)?;
exit_span_fn.setattr("__module__", "monarch._src.actor._extension.telemetry")?;
module.add_function(exit_span_fn)?;

let get_current_span_id_fn = wrap_pyfunction!(get_current_span_id, module)?;
get_current_span_id_fn.setattr(
"__module__",
"monarch._src.actor._extension.hyperactor_extension.telemetry",
)?;
get_current_span_id_fn.setattr("__module__", "monarch._src.actor._extension.telemetry")?;
module.add_function(get_current_span_id_fn)?;

let use_real_clock_fn = wrap_pyfunction!(use_real_clock, module)?;
use_real_clock_fn.setattr(
"__module__",
"monarch._src.actor._extension.hyperactor_extension.telemetry",
)?;
use_real_clock_fn.setattr("__module__", "monarch._src.actor._extension.telemetry")?;
module.add_function(use_real_clock_fn)?;

let use_sim_clock_fn = wrap_pyfunction!(use_sim_clock, module)?;
use_sim_clock_fn.setattr(
"__module__",
"monarch._src.actor._extension.hyperactor_extension.telemetry",
)?;
use_sim_clock_fn.setattr("__module__", "monarch._src.actor._extension.telemetry")?;
module.add_function(use_sim_clock_fn)?;

module.add_class::<PySpan>()?;
Expand Down
17 changes: 0 additions & 17 deletions hyperactor_extension/Cargo.toml

This file was deleted.

169 changes: 0 additions & 169 deletions hyperactor_extension/src/alloc.rs

This file was deleted.

12 changes: 0 additions & 12 deletions hyperactor_extension/src/lib.rs

This file was deleted.

1 change: 0 additions & 1 deletion monarch_hyperactor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ clap = { version = "4.5.38", features = ["derive", "env", "string", "unicode", "
erased-serde = "0.3.27"
fbinit = { version = "0.2.0", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "main" }
hyperactor = { version = "0.0.0", path = "../hyperactor" }
hyperactor_extension = { version = "0.0.0", path = "../hyperactor_extension" }
hyperactor_mesh = { version = "0.0.0", path = "../hyperactor_mesh" }
hyperactor_multiprocess = { version = "0.0.0", path = "../hyperactor_multiprocess" }
hyperactor_telemetry = { version = "0.0.0", path = "../hyperactor_telemetry" }
Expand Down
Loading
Loading