Closed maswiebe closed 2 years ago
I just added the keep_pars
argument last week. I see it in the master
branch here: https://github.com/rgiordan/zaminfluence/blob/14fc32b43638b64b3603849450da3af73760170d/zaminfluence/R/ols_iv_grads_torch_lib.R#L447
So I think this could be caused by trying to run the new example script with an old version of zaminfluence
. Are you sure you've got the latest version of zaminfluence
installed?
Ok, just restarted R.
packageVersion("zaminfluence")
[1] ‘0.0.0.9000’
Now I can get through ComputeModelInfluence(fit_object, keep_pars=c("x2", "x1"))
, but it breaks on AppendTargetRegressorInfluence("x1")
:
Error in cpp_torch_float64() : Lantern is not loaded. Please use
install_torch()
to install additional dependencies.
But this doesn't work:
install_torch()
trying URL 'https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-1.10.2%2Bcpu.zip' Error in utils::download.file(library_url, temp_file) : cannot open URL 'https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-1.10.2%2Bcpu.zip' In addition: Warning message: In utils::download.file(library_url, temp_file) : URL 'https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-1.10.2%2Bcpu.zip': status was 'SSL peer certificate or SSH remote key was not OK'
Fyi
sessionInfo()
R version 4.1.3 (2022-03-10) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 20.04.4 LTS
This sounds like a torch
problem, though of course it may be somehow related to how I have set up dependencies.
Are you able to succesfully follow the installation instructions for the torch
package?
Ok, install.packages("torch")
did the trick. Works fine now!
When I run:
I get the error:
Error in ComputeModelInfluence(fit_object, keep_pars = c("x2", "x1")) : unused argument (keep_pars = c("x2", "x1"))
The code seems to work fine if I drop
keep_pars
and just runComputeModelInfluence(fit_object)
, which is what the readme example does.