Skip to content

Commit

Permalink
skip execution
Browse files Browse the repository at this point in the history
  • Loading branch information
cgarciae committed Feb 9, 2023
1 parent b647d84 commit a573167
Show file tree
Hide file tree
Showing 20 changed files with 4,219 additions and 4,146 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install standalone dependencies only
run: |
pip install .
pip install -e .
- name: Test importing Flax
run: |
python -c "import flax"
Expand Down
5 changes: 4 additions & 1 deletion docs/advanced_topics/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,12 @@ Follow these steps to contribute code:
```bash
git clone https://github.com/YOUR_USERNAME/flax
cd flax
pip install ".[testing]"
pip install -e .
pip install ".[testing]"
pip install -r docs/requirements.txt
# install in editable mode again because docs/requirements.txt
# install . in non-editable mode
pip install -e .
```

5. Set up pre-commit hooks, this will run some automated checks during each `git` commit and
Expand Down
9 changes: 6 additions & 3 deletions docs/getting_started.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
},
"outputs": [],
"source": [
"!pip install -q flax"
"! pip install -q flax"
]
},
{
Expand Down Expand Up @@ -274,11 +274,14 @@
"user_tz": 480
},
"id": "qXr7JDpIxGNZ",
"outputId": "1249b7fb-6787-41eb-b34c-61d736300844"
"outputId": "1249b7fb-6787-41eb-b34c-61d736300844",
"tags": [
"skip-execution"
]
},
"outputs": [],
"source": [
"!pip install -q clu"
"! pip install -q clu"
]
},
{
Expand Down
5 changes: 3 additions & 2 deletions docs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ the network for image classification on the MNIST dataset.
:id: bb81587e
:tags: [skip-execution]
!pip install -q flax
! pip install -q flax
```

+++ {"id": "b529fbef"}
Expand Down Expand Up @@ -173,8 +173,9 @@ executionInfo:
user_tz: 480
id: qXr7JDpIxGNZ
outputId: 1249b7fb-6787-41eb-b34c-61d736300844
tags: [skip-execution]
---
!pip install -q clu
! pip install -q clu
```

```{code-cell}
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/flax_basics.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@
],
"source": [
"# Install the latest JAXlib version.\n",
"!pip install --upgrade -q pip jax jaxlib\n",
"! pip install --upgrade -q pip jax jaxlib\n",
"# Install Flax at head:\n",
"!pip install --upgrade -q git+https://github.com/google/flax.git"
"! pip install --upgrade -q git+https://github.com/google/flax.git"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/flax_basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ outputId: e30aa464-fa52-4f35-df96-716c68a4b3ee
tags: [skip-execution]
---
# Install the latest JAXlib version.
!pip install --upgrade -q pip jax jaxlib
! pip install --upgrade -q pip jax jaxlib
# Install Flax at head:
!pip install --upgrade -q git+https://github.com/google/flax.git
! pip install --upgrade -q git+https://github.com/google/flax.git
```

```{code-cell}
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/flax_on_pjit.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"outputs": [],
"source": [
"# Once Flax v0.6.4 is released, use `pip3 install flax`.\n",
"!pip3 install -qq \"git+https://github.com/google/flax.git@main#egg=flax\""
"! pip3 install -qq \"git+https://github.com/google/flax.git@main#egg=flax\""
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/flax_on_pjit.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Install Flax from HEAD:
:id: 867203db3bef
# Once Flax v0.6.4 is released, use `pip3 install flax`.
!pip3 install -qq "git+https://github.com/google/flax.git@main#egg=flax"
! pip3 install -qq "git+https://github.com/google/flax.git@main#egg=flax"
```

+++ {"id": "a9601432b448"}
Expand Down
11 changes: 8 additions & 3 deletions docs/guides/model_surgery.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
},
"outputs": [],
"source": [
"!pip install --upgrade -q pip jax jaxlib flax"
"! pip install --upgrade -q pip jax jaxlib flax"
]
},
{
Expand Down Expand Up @@ -230,7 +230,7 @@
"formats": "md,ipynb"
},
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": ".venv",
"language": "python",
"name": "python3"
},
Expand All @@ -244,7 +244,12 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.15"
"version": "3.8.10"
},
"vscode": {
"interpreter": {
"hash": "ec7c69eb752b35b8fd728edc4753e382b54c10c43e6028c93b5837f81a552f5c"
}
}
},
"nbformat": 4,
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/model_surgery.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jupyter:
format_version: '1.3'
jupytext_version: 1.13.8
kernelspec:
display_name: Python 3 (ipykernel)
display_name: .venv
language: python
name: python3
---
Expand All @@ -22,7 +22,7 @@ Usually, Flax modules and optimizers track and update the params for you. But th
## Setup

```python tags=["skip-execution"]
!pip install --upgrade -q pip jax jaxlib flax
! pip install --upgrade -q pip jax jaxlib flax
```

```python
Expand Down
6 changes: 3 additions & 3 deletions docs/notebooks/full_eval.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@
}
],
"source": [
"!pip install -q chex einops\n",
"! pip install -q chex einops\n",
"# tfds.split_for_jax_process() was added in 4.5.1\n",
"!pip install -q tensorflow_datasets -U\n",
"! pip install -q tensorflow_datasets -U\n",
"# flax.jax_utils.pad_shard_unpad() is only available at HEAD\n",
"!pip install -q git+https://github.com/google/flax"
"! pip install -q git+https://github.com/google/flax"
]
},
{
Expand Down
6 changes: 3 additions & 3 deletions docs/notebooks/full_eval.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ id: 62DTHYCYHWp1
outputId: b38d096f-58db-4d61-effa-eafa4c732826
tags: [skip-execution]
---
!pip install -q chex einops
! pip install -q chex einops
# tfds.split_for_jax_process() was added in 4.5.1
!pip install -q tensorflow_datasets -U
! pip install -q tensorflow_datasets -U
# flax.jax_utils.pad_shard_unpad() is only available at HEAD
!pip install -q git+https://github.com/google/flax
! pip install -q git+https://github.com/google/flax
```

```{code-cell} ipython3
Expand Down
4 changes: 2 additions & 2 deletions docs/notebooks/linen_intro.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@
"outputs": [],
"source": [
"# Install the newest JAXlib version.\n",
"!pip install --upgrade -q pip jax jaxlib\n",
"! pip install --upgrade -q pip jax jaxlib\n",
"# Install Flax at head:\n",
"!pip install --upgrade -q git+https://github.com/google/flax.git"
"! pip install --upgrade -q git+https://github.com/google/flax.git"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions docs/notebooks/linen_intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ The below is an alpha API preview and things might break. The surface syntax of
:tags: [skip-execution]
# Install the newest JAXlib version.
!pip install --upgrade -q pip jax jaxlib
! pip install --upgrade -q pip jax jaxlib
# Install Flax at head:
!pip install --upgrade -q git+https://github.com/google/flax.git
! pip install --upgrade -q git+https://github.com/google/flax.git
```

```{code-cell}
Expand Down
Loading

0 comments on commit a573167

Please sign in to comment.