OHDSI Home | Forums | Wiki | Github

Error in Patient Level Prediction 5.0.5

Hi all,
we found some bug in the Helpers module and in particular in createTempModelLoc()
createTempModelLoc ← function(){
repeat{
loc ← paste(tempdir(), paste0(‘python_models_’,sample(10002323,1)), sep = ‘\’)
which should be changed to file.path() in order to be compatible with Linux OS.

Additionally found in:
R/SklearnClassifier.R

load model

if(plpModel$settings$modelSettings$extraSettings$saveToJson){
skljson ← reticulate::import(‘sklearn_json’)
modelLocation ← reticulate::r_to_py(paste0(plpModel$model,"\model.json"))
model ← skljson$from_json(modelLocation)
} else{
joblib ← reticulate::import(‘joblib’)
modelLocation ← reticulate::r_to_py(paste0(plpModel$model,"\model.pkl"))
model ← joblib$load(os$path$join(modelLocation))
}

It is possible that it might surface in other places of the project

kind regards
yannis

t