Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pgml-extension/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ transformers==4.31.0
xgboost==1.7.6
langchain==0.0.237
einops==0.6.1
pynvml==11.5.0
2 changes: 2 additions & 0 deletions pgml-extension/src/bindings/transformers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,8 @@ pub fn load_dataset(
}

pub fn clear_gpu_cache(memory_usage: Option<f32>) -> Result<bool> {
crate::bindings::venv::activate();

Python::with_gil(|py| -> Result<bool> {
let clear_gpu_cache: Py<PyAny> = PY_MODULE.getattr(py, "clear_gpu_cache")?;
let success = clear_gpu_cache
Expand Down