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

Error 403 when trying to access https://torch-cdn.mlverse.org/ #1301

Open
jonlachmann opened this issue Mar 20, 2025 · 6 comments
Open

Error 403 when trying to access https://torch-cdn.mlverse.org/ #1301

jonlachmann opened this issue Mar 20, 2025 · 6 comments

Comments

@jonlachmann
Copy link

When trying to download the latest lantern version using torch::install_torch() I received a 403 forbidden error. I checked with sites like downforeveryoneorjustme and confirmed it seems to be something general. I am guessing some quota was exceeded or some other misconfiguration may have caused it.

Not sure if this is the best place for it, but I thought I should let you know somewhere.

Image
@dfalbel
Copy link
Member

dfalbel commented Mar 20, 2025

Can you provide the link that is failing? I don't think torch-cdn.mlverse.org has anything in it's root that can be accessed, so it's possible that we're actually generating the wrong link for you.

FWIW torch can possibly generate wrong links, specially if the CUDA version is not supported. We need to throw a better error in this case. Currently it seems it's just a download failure.

@jonlachmann
Copy link
Author

This is the full output I get, I tried copying the link to the browser but also got the 403 there.

Warning in utils::download.file(url = url, destfile = destfile) :
  cannot open URL 'https://torch-cdn.mlverse.org/binaries/refs/heads/cran/v0.14.0/latest/lantern-0.14.2%2Bcpu%2Barm64-Darwin.zip': HTTP status was '403 Forbidden'
Warning in file.remove(tmp) :
  cannot remove file '/var/folders/b_/m_tzf_zs50n1712v2trcym6h0000gn/T//RtmpQpPQYA/file738d4ffda3.zip', reason 'No such file or directory'

Error in download_file(url = url, destfile = tmp): ✖ Unable to download from <https://torch-cdn.mlverse.org/binaries/refs/heads/cran/v0.14.0/latest/lantern-0.14.2+cpu+arm64-Darwin.zip>
ℹ 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()`:
! cannot open URL 'https://torch-cdn.mlverse.org/binaries/refs/heads/cran/v0.14.0/latest/lantern-0.14.2+cpu+arm64-Darwin.zip'
Show stack trace

@dfalbel
Copy link
Member

dfalbel commented Mar 20, 2025

There's definitely something wronmg with the URL:

Should be:
https://torch-cdn.mlverse.org/binaries/refs/heads/cran/v0.14.2/latest/lantern-0.14.2%2Bcpu+arm64-Darwin.zip

But it has cran/v0.14.0 in the path
Is this the CRAN version of torch?

@jonlachmann
Copy link
Author

It makes sense, what I did was the following:

  • Open R, load torch
  • Realized I should probably update, called install.packages("torch")
  • Tried to immediately run torch::install_torch()

I had 0.14.0 installed before, and installed 0.14.2, so probably a messed up environment caused the invalid URL.

@dfalbel
Copy link
Member

dfalbel commented Mar 20, 2025

Ohh this makes sense because the first part of the URL is hardcoded in the package code and the second time the version appears is actually obtained from the DESCRIPTION file.

@jonlachmann
Copy link
Author

I got it to work by restarting a few times and poking around. The 403 confused me as I expected a 404 from a wrong URL. Anyways, thanks for the assistance, and let me know if you need any further details for a fix or anything.

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