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

The links on the Byte-Sized tutorials all return 404. #300

Closed
CBrauer opened this issue Oct 23, 2019 · 14 comments
Closed

The links on the Byte-Sized tutorials all return 404. #300

CBrauer opened this issue Oct 23, 2019 · 14 comments
Labels
bug Something isn't working

Comments

@CBrauer
Copy link

CBrauer commented Oct 23, 2019

Please fix the links on the "Byte-Sized Tutorials". All I get is 404!

@CBrauer CBrauer added the bug Something isn't working label Oct 23, 2019
@Balandat
Copy link
Contributor

@CBrauer I just checked, the links work fine for me on both the "latest" and "stable" version of botorch.org.

How / where exactly are you trying to access these? Does https://botorch.org/v/latest/tutorials/fit_model_with_torch_optimizer work?

If not, what browser are you using?

@CBrauer
Copy link
Author

CBrauer commented Oct 23, 2019 via email

@Balandat
Copy link
Contributor

Which github site? I still don't understand where/how you're trying to access the tutorials. Can you provide a link?

@CBrauer
Copy link
Author

CBrauer commented Oct 24, 2019 via email

@Balandat
Copy link
Contributor

Ahh ok, I see - the https://pytorch.org/botorch/ site is not meant to be accessed directly, please use the public site https://botorch.org.

Some background: Unfortunately there are some relative link issues that Docusaurus (the tool we use for building the website) is not able to handle well in conjunction with redirects. Quoting @Jakepodell here:

A lot of how docusaurus links assets is heavily reliant on that baseUrl field, which cannot be relative to to the current directory but rather has to be relative to the top-level hostname.
See facebook/docusaurus#448, where they admit I think at this point our architecture relies a lot on baseUrl and supporting this will be quite a huge refactor. I personally feel the effort is better spent elsewhere.
The baseUrl also cannot be a fully absolute path, like 'https://botorch.org". The result of all these findings is basically that docusarus is not set up to support the same site existing at two different paths relative to their top-level hostnames.

Unfortunately it doesn't seem that docusaurus is planning to fix this anytime soon, so for now we'll just have to try to keep people away from the https://pytorch.org/botorch/ and possibly move away from docusaurus down the road (this doesn't seem to be addressed in docusaurus 2.0 either).

cc @JoelMarcey

@JoelMarcey
Copy link
Contributor

This is actually not fully a Docusaurus issue, tbh, if at all really. It is how we have some of our domains setup internally and via the CDN we use.

For example, if you go to https://facebook.github.io/docusaurus, you will see it automatically redirects to https://docusaurus.io. And, of course, the Docusaurus site uses Docusaurus. Hydra is another example --- https://facebookresearch.github.io/hydra ==> https://cli.dev. It also uses Docusaurus. The way we have those domains setup are a little different, allowing for redirecting to work correctly.

This is more of fixing some of the underlying infrastructure of the configuration of some of our domains, imho.

@endiliey
Copy link

I think its because this repo didnt set a CNAME on siteConfig. Thats why it happens. Maybe its worth a try to set CNAME on siteConfig.js so that the built static files will have CNAME like https://github.com/facebookresearch/hydra/blob/gh-pages/CNAME

@JoelMarcey
Copy link
Contributor

@endiliey that would be the normal course of action, yes. Like we do for Docusaurus and Hydra in my examples above. But in this case, the way we have our domains set up, it will cause a permanent redirect. (You could test it I suppose, but I am 99% sure I am right here)

That said, remembering a conversation with @zpao, we may just need to point out internal domain directly to GitHub instead of our CDN and figure another way to get a cert going.

Sent with GitHawk

@Balandat
Copy link
Contributor

But in this case, the way we have our domains set up, it will cause a permanent redirect. (You could test it I suppose, but I am 99% sure I am right here)

Yes, I did test this, browser quits b/c of too many redirects.

zpao added a commit to zpao/botorch that referenced this issue Oct 30, 2019
zpao added a commit to zpao/botorch that referenced this issue Oct 30, 2019
@Balandat
Copy link
Contributor

Balandat commented Nov 1, 2019

Reopening until it is verified that this works on the "latest" version of the site (will be auto-deployed over night).

@Balandat Balandat reopened this Nov 1, 2019
@Balandat
Copy link
Contributor

Balandat commented Nov 1, 2019

This in fact does not work properly with the versioned site. If you go to https://pytorch.org/botorch/v/latest/index.html then the site realizes that you are in the wrong place, but the redirect takes you to https://botorch.org/v/latest/v/latest/index.html (instead of https://botorch.org/v/latest/index.html), yielding a 404.

@zpao
Copy link
Contributor

zpao commented Nov 1, 2019

Hmm, your versioned docs are … special I suppose. baseURL in your siteConfig is just / which would work. But seems like these docs are spacial and you'll want to do more in here: https://github.com/pytorch/botorch/blob/master/website/core/Footer.js#L100

@Balandat
Copy link
Contributor

Balandat commented Nov 1, 2019

Indeed. I guess we should handle both the case of /botorch/ and /botorch/v/**/.

@Balandat
Copy link
Contributor

deployed new website for the stable version, this issue is mitigated now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants