Skip to content

Commit

Permalink
drop debug server from hyperparameter
Browse files Browse the repository at this point in the history
  • Loading branch information
reiase committed Jan 2, 2024
1 parent 1fa625c commit 7fa274f
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 471 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ with param_scope(**{"foo.x": 2}):
fn foo() -> i32 {
with_params! {
get x = foo.x or 1i32; // Read hyperparameter with default value

println!("x={}", x);
}
}
Expand All @@ -70,6 +71,7 @@ fn main() {

with_params! {
set foo.x = 2i32; // Set hyperparameter

foo(); // x=2
}

Expand Down Expand Up @@ -129,6 +131,7 @@ with_params!{ // 1st scope start
with_params!{ //2nd scope start
set foo.y=2

...
} // 2nd scope end
} // 1st scope end
```
Expand Down
3 changes: 3 additions & 0 deletions README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ with param_scope(**{"foo.x": 2}):
fn foo() -> i32 {
with_params! {
get x = foo.x or 1i32; // 读取带有默认值的超参数

println!("x={}", x);
}
}
Expand All @@ -70,6 +71,7 @@ fn main() {

with_params! {
set foo.x = 2i32; // 设置超参数

foo(); // x=2
}

Expand Down Expand Up @@ -129,6 +131,7 @@ with_params!{ // 第1个作用域开始
with_params!{ //第2个作用域开始
set foo.y=2

...
} // 第2个作用域结束
} // 第1个作用域结束
```
Expand Down
75 changes: 0 additions & 75 deletions examples/debug_server.rs

This file was deleted.

154 changes: 0 additions & 154 deletions hyperparameter/src/debug.rs

This file was deleted.

6 changes: 0 additions & 6 deletions hyperparameter/src/ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ use pyo3::types::PyList;
use pyo3::types::PyString;
use pyo3::FromPyPointer;

use crate::debug::enable_debug_server;
use crate::debug::sleep;

#[repr(C)]
enum UserDefinedType {
PyObjectType = 1,
Expand Down Expand Up @@ -198,8 +195,5 @@ pub fn xxh64(s: &str) -> u64 {
fn librbackend(_py: Python<'_>, m: &PyModule) -> PyResult<()> {
m.add_class::<KVStorage>()?;
m.add_function(wrap_pyfunction!(xxh64, m)?)?;
m.add_function(wrap_pyfunction!(sleep, m)?)?;
m.add_function(wrap_pyfunction!(enable_debug_server, m)?)?;
m.add_function(wrap_pyfunction!(crate::debug::backtrace, m)?)?;
Ok(())
}
1 change: 0 additions & 1 deletion hyperparameter/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
pub mod debug;
pub mod ext;
Loading

0 comments on commit 7fa274f

Please sign in to comment.