forked from facebook/Ax
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Pull Request resolved: facebook#3294 ## Context This is the Ax counterpart to the same upgrade in Botorch: pytorch/botorch#2653 ## Motivation We are already using most of the correct tooling but it has become very out of date and is tied together with scripts that are difficult to maintain. Upgrade our tooling by updating to latest versions and dramatically simplifying our setup/deploy scripts. Includes: - Upgrade Docusaurus from V1 to V3 - Utilize new MDX support in Docusaurus by converting our tutorials to MDX (previously converted to html) - Tutorials link to Colab for easy execution - Website versioning is now handled natively through Docusaurus - New website versions are only created for major and minor releases (not patches) - Build and Deploy workflows have been dramatically simplified - Change Sphinx theme to ReadTheDocs - API Reference is still built using Sphinx but is now hosted by ReadTheDocs. ReadTheDocs also handles versioning. - Legacy website will be frozen and available at [archive.ax.dev](archive.ax.dev) - Served by Vercel from the `archive` branch - Website now supports dark mode | Before | After | | -------- | ------- | | <img width="1325" alt="image" src="https://github.com/user-attachments/assets/4af73120-f125-47e2-8285-bd01f4251ee9" /> | <img width="1330" alt="image" src="https://github.com/user-attachments/assets/ea17c47c-5012-47ab-a9d2-4b7e9c103cb0" /> | | <img width="1328" alt="image" src="https://github.com/user-attachments/assets/3dbde70a-8b84-43a4-8374-362f594de7fc" /> | <img width="1332" alt="image" src="https://github.com/user-attachments/assets/c779b7dd-76b9-4eb3-9b08-ca663732d7ec" /> | | <img width="1328" alt="image" src="https://github.com/user-attachments/assets/25d74ed7-4536-43a3-8654-ed291ae50cf3" /> | <img width="1331" alt="image" src="https://github.com/user-attachments/assets/e2438746-d975-4a09-96b5-d73e5d1a9980" /> | | <img width="1327" alt="image" src="https://github.com/user-attachments/assets/bcf71617-a537-45e4-a5e8-452de946a238" /> | <img width="1277" alt="image" src="https://github.com/user-attachments/assets/71b34ff9-1aaf-4c39-ade1-7bb346aad317" /> | ## Considerations - Our tutorials are natively embedded and versioned in the website using Docusaurus, but our sphinx-generated API reference is not. ReadTheDocs will create new version of the sphinx docs for every new release tag in our github repo. - Continue using same integrations for Algolia Search and Google Analytics - The number and type of github workflows we have remain the same, but the complexity of the workflows and the supporting scripts has been simplified. Pull Request resolved: facebook#3289 Test Plan: - I've enabled all the workflows in my PR and everything is passing [https://github.com/CristianLara/botorch/actions](https://github.com/CristianLara/botorch/actions) - Pypy deploy and codecov are failing as expected due to missing credentials - Website for my fork is being actively built and served at [cristianlara.me/Ax](cristianlara.me/Ax) - API Reference is being built and served by ReadTheDocs at [https://ax.readthedocs.io/](https://ax.readthedocs.io/) Differential Revision: D68916590 Pulled By: CristianLara
- Loading branch information
1 parent
9bd4c16
commit b8f4d1a
Showing
79 changed files
with
3,220 additions
and
4,621 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: Publish Website | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
new_version: | ||
required: false | ||
type: string | ||
run_tutorials: | ||
required: false | ||
type: boolean | ||
default: false | ||
workflow_dispatch: | ||
|
||
|
||
jobs: | ||
|
||
build-website: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: 'docusaurus-versions' # release branch | ||
fetch-depth: 0 | ||
- name: Sync release branch with main | ||
run: | | ||
git config --global user.name "github-actions[bot]" | ||
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
git merge origin/main | ||
# To avoid a large number of commits we don't push this sync commit to github until a new release. | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
- name: Install dependencies | ||
run: | | ||
pip install -e ".[tutorial]" | ||
- if: ${{ inputs.run_tutorials }} | ||
name: Run Tutorials | ||
run: | | ||
python scripts/run_tutorials.py -w $(pwd) | ||
- if: ${{ inputs.new_version }} | ||
name: Create new docusaurus version | ||
run: | | ||
python3 scripts/convert_ipynb_to_mdx.py --clean | ||
cd website | ||
yarn | ||
yarn docusaurus docs:version ${{ inputs.new_version }} | ||
git add --all | ||
git commit -m "Create version ${{ inputs.new_version }} of site in Docusaurus" | ||
git push --force origin HEAD:docusaurus-versions | ||
- name: Build website | ||
run: | | ||
bash scripts/make_docs.sh -b | ||
- name: Upload website build as artifact | ||
id: deployment | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: website/build/ | ||
|
||
deploy-website: | ||
needs: build-website | ||
permissions: | ||
pages: write | ||
id-token: write | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
version: "2" | ||
|
||
build: | ||
os: "ubuntu-22.04" | ||
tools: | ||
python: "3.12" | ||
jobs: | ||
post_install: | ||
# Install latest botorch if not on a released version | ||
- | | ||
tag=$(eval "git name-rev --name-only --tags HEAD") | ||
if [ $tag = "undefined" ]; then | ||
pip install git+https://github.com/cornellius-gp/gpytorch.git | ||
pip install git+https://github.com/pytorch/botorch.git | ||
fi | ||
python: | ||
install: | ||
- method: pip | ||
path: . | ||
extra_requirements: | ||
- dev | ||
|
||
sphinx: | ||
configuration: sphinx/source/conf.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.