Skip to content

Commit 46e33b3

Browse files
authored
Added filename and modulename (#1245)
1 parent da509e2 commit 46e33b3

File tree

1 file changed

+5
-3
lines changed
  • pgml-extension/src/bindings

1 file changed

+5
-3
lines changed

pgml-extension/src/bindings/mod.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@ macro_rules! create_pymodule {
1717
pyo3::Python::with_gil(|py| -> anyhow::Result<pyo3::Py<pyo3::types::PyModule>> {
1818
use $crate::bindings::TracebackError;
1919
let src = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), $pyfile));
20-
Ok(pyo3::types::PyModule::from_code(py, src, "", "")
21-
.format_traceback(py)?
22-
.into())
20+
Ok(
21+
pyo3::types::PyModule::from_code(py, src, "transformers.py", "__main__")
22+
.format_traceback(py)?
23+
.into(),
24+
)
2325
})
2426
});
2527
};

0 commit comments

Comments
 (0)