Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Newest reticulate breaks PLP #441

Closed
egillax opened this issue Apr 15, 2024 · 2 comments
Closed

Newest reticulate breaks PLP #441

egillax opened this issue Apr 15, 2024 · 2 comments

Comments

@egillax
Copy link
Collaborator

egillax commented Apr 15, 2024

Errors like this:

── Error ('test-sklearnClassifier.R:64:3'): check fit of DecisionTree ──────────
<python.builtin.TypeError/python.builtin.Exception/python.builtin.BaseException/python.builtin.object/error/condition>
Error in `py_get_item(x, name)`: TypeError: 'module' object is not subscriptable
Run `reticulate::py_last_error()` for details.
Backtrace:1. └─PatientLevelPrediction::fitPlp(...) at test-sklearnClassifier.R:64:3
 2.   ├─base::do.call(fun, args) at PatientLevelPrediction/R/Fit.R:84:3
 3.   └─PatientLevelPrediction (local) `<fn>`(...)
 4.     ├─base::do.call(...) at PatientLevelPrediction/R/SklearnClassifier.R:61:3
 5.     └─PatientLevelPrediction (local) `<fn>`(...)
 6.       ├─firstImport[[pythonImportSecond]] at PatientLevelPrediction/R/SklearnClassifier.R:254:5
 7.       └─reticulate:::`[[.python.builtin.object`(firstImport, pythonImportSecond) at PatientLevelPrediction/R/SklearnClassifier.R:254:5
 8.         └─reticulate:::py_get_attr_or_item(x, name, FALSE)
 9.           └─reticulate::py_get_item(x, name)
@egillax
Copy link
Collaborator Author

egillax commented Apr 16, 2024

I fixed this. This was happening because the import of python modules was broken. Now each scikit-learn models saves the python module and python class it needs and the gridCvPython function imports them.

@egillax
Copy link
Collaborator Author

egillax commented Apr 29, 2024

Fixed by #446

@egillax egillax closed this as completed Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant