INNER CODE UNIT · Rust
deduper_entrypoint
allenai/dolma · src/lib.rs:22
fn deduper_entrypoint(config_str: &str) -> PyResult<()> {
let config: DeduperConfig = DeduperConfig::parse_from_string(config_str).unwrap();
if let Err(cnt) = deduper::run(config) {
return Err(exceptions::PyRuntimeError::new_err(format!(
"Failed with {} errors",
cnt
)));
}
Ok(())
}
#[pyfunction]
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!(