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

Issue Encountered When Using DeepHit for Survival Prediction #1282

Open
juinzhu opened this issue Feb 19, 2025 · 1 comment
Open

Issue Encountered When Using DeepHit for Survival Prediction #1282

juinzhu opened this issue Feb 19, 2025 · 1 comment

Comments

@juinzhu
Copy link

juinzhu commented Feb 19, 2025

When applying DeepHit for survival prediction, I encountered the following issue:

lrns[[i]]
LearnerSurvDeephit:surv.deephit: Neural Network

  • Model: -
  • Parameters: list()
  • Packages: mlr3, mlr3proba, mlr3extralearners, survivalmodels, distr6,
    reticulate
  • Predict Types: [crank], distr
  • Feature Types: integer, numeric
  • Properties: -

lrns[[i]]$train(lungtask)
Error in py_module_import(module, convert = convert) :
ImportError: dlopen(/Users/juinzhu/miniconda3/envs/p39/lib/python3.9/site-packages/torch/_C.cpython-39-darwin.so, 0x0002): Symbol not found: _ZN3c1010ReplaceAllERNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEENS0_17basic_string_viewIcS3_EES9
Referenced from: <552ADBFF-CB85-30D2-9765-6C0C3EB625D7> /Users/juinzhu/miniconda3/envs/p39/lib/python3.9/site-packages/torch/lib/libtorch_python.dylib
Expected in: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/torch/lib/libc10.dylib
My Python version is 3.9.7, with PyTorch 2.6.0.

The R version I am using is 4.4.2, and in R, the version of PyTorch installed is 0.14.2.

What should I do?

@cregouby
Copy link
Collaborator

Hello @juinzhu

There is a confusion here between {torch} that has nothing related to python nor pytorch, and your issue.

As your log mention miniconda, py_module_import() and libtorch_python, I would recommand you to open your issue either in {survivalmodels} or one of the other of your package.

As a general advice, publishing a reproductible example with reprex::reprex() would have shown directly that you don't rely on {torch} in your issue.

Hope you will find a solution to your issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants