Skip to content

Commit bc9bedf

Browse files
authored
Activate venv for predicting (#994)
1 parent 38f8b1f commit bc9bedf

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pgml-extension/src/orm/model.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ impl Model {
8989
};
9090

9191
if runtime == Runtime::python {
92-
crate::bindings::python::activate().unwrap();
92+
let _ = crate::bindings::python::activate();
9393
}
9494

9595
let dataset = snapshot.tabular_dataset();
@@ -333,7 +333,10 @@ impl Model {
333333
}
334334

335335
#[cfg(feature = "python")]
336-
Runtime::python => crate::bindings::sklearn::Estimator::from_bytes(&data)?,
336+
Runtime::python => {
337+
let _ = crate::bindings::python::activate();
338+
crate::bindings::sklearn::Estimator::from_bytes(&data)?
339+
}
337340

338341
#[cfg(not(feature = "python"))]
339342
Runtime::python => {

0 commit comments

Comments
 (0)