INNER CODE UNIT · Rust
mixer_entrypoint
allenai/dolma · src/lib.rs:35
fn mixer_entrypoint(config_str: &str) -> PyResult<()> {
//Result<u32, PyErr> {
let config: MixerConfig = MixerConfig::parse_from_string(config_str).unwrap();
if let Err(cnt) = mixer::run(config) {
return Err(exceptions::PyRuntimeError::new_err(format!(
"Failed with {} errors",
cnt
)));
}
Ok(())
}
/// Adblocker class
/// Hold the adblocker engine loaded with the rules
///
/// input:
/// rules: List[str] -> list of strings that represent the rules to be applied
///