always problem with torch on R for ML

Hello

suddently my R code stopped working with basic ML models sending error messages.
for example: "Error in brulee_mlp_bridge():! The torch backend has not been installed; use torch::install_torch()"
when i install again error messages: "'https://torch-cdn.mlverse.org/binaries/refs/heads/cran/v0.14.2/latest/lantern-0.14.2+cpu-win64.zip'
Error in download_file():x Unable to download from
https://torch-cdn.mlverse.org/binaries/refs/heads/cran/v0.14.2/latest/lantern-0.14.2+cpu-win64.zip
i Please verify that the URL is not blocked by your firewall. See also
https://torch.mlverse.org/docs/articles/installation.html#file-based-download
Caused by error in utils::download.file():"

Error in brulee_mlp_bridge():
! The torch backend has not been installed; use torch::install_torch().

Backtrace:
x

  1. +-parsnip::fit(...)
  2. +-workflows:::fit.workflow(...)
  3. | -workflows::.fit_model(workflow, control)
  4. | +-generics::fit(action_model, workflow = workflow, control = control)
  5. | -workflows:::fit.action_model(...)
  6. | -workflows:::fit_from_xy(spec, mold, case_weights, control_parsnip)
  7. | +-generics::fit_xy(...)
  8. | -parsnip::fit_xy.model_spec(...)
  9. | -parsnip:::xy_xy(...)
  10. | -parsnip:::eval_mod(...)
  11. | -rlang::eval_tidy(e, env = envir, ...)
  12. +-brulee::brulee_mlp(...)
  13. -brulee:::brulee_mlp.data.frame(...)
  14. -brulee:::brulee_mlp_bridge(...)
    Run rlang::last_trace(drop = FALSE) to see 2 hidden frames.

Thank you

Torch requires an external library called Lantern. Lantern binaries are downloaded from a CDN when you call torch::install_torch(). It seems, you are not able to download files from this URL for some reason - thus you see:

Error in download_file():x Unable to download from
https://torch-cdn.mlverse.org/binaries/refs/heads/cran/v0.14.2/latest/lantern-0.14.2+cpu-win64.zip

Investigating why downloading this file fails is how I'd approach for a solution. Maybe you can take the URL and paste it in your browser and see if it can download. If it works, you may be able to follow instructions from
Installation • torch to install directly from the file you have downloaded.

Thank you ! you are right, i remember that i could download manually the files but not through torch::install_torch() where i get error message which is strange. But once i download them i did no know in which file i was intented to unzip them. In the link you show, it is not written.

I forgot, i see torch installed on R but here is a message error on the backend:
Error in brulee_mlp_bridge():
! The torch backend has not been installed; use torch::install_torch().
Run rlang::last_trace() to see where the error occurred.