You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`src/dependencies/requirements/base_requirements/cuda12-requirements.txt`) or the post-training files (`src/dependencies/requirements/base_requirements/tpu-post-train-requirements.txt`).
40
40
2.**Find the JAX build commit hash**: The dependency generation process is
41
41
pinned to a specific nightly build of JAX. You need to find the commit hash
42
42
for the desired JAX build.
43
43
3.**Generate the requirement files**: Run the `seed-env` CLI tool to generate
44
44
new, fully-pinned requirements files based on your changes.
45
-
4.**Update project files**: Copy the newly generated files into the
46
-
`src/dependencies/requirements/generated_requirements/` directory. If
47
-
necessary, also update any dependencies that are installed directly from
48
-
GitHub from the generated files to `src/dependencies/extra_deps`.
49
-
5.**Verify the new dependencies**: Test the new dependencies to ensure the
45
+
4.**Verify the new dependencies**: Test the new dependencies to ensure the
50
46
project installs and runs correctly.
51
47
52
48
The following sections provide detailed instructions for each step.
@@ -70,31 +66,23 @@ if you want to build `seed-env` from source.
70
66
71
67
## Step 1: Modify base requirements
72
68
73
-
Update the desired dependencies in
74
-
`src/dependencies/requirements/base_requirements/requirements.txt` or the
Update the desired dependencies in `src/dependencies/requirements/base_requirements/requirements.txt` or the hardware-specific pre-training files (`src/dependencies/requirements/base_requirements/tpu-requirements.txt`, `src/dependencies/requirements/base_requirements/cuda12-requirements.txt`) or the post-training files (`src/dependencies/requirements/base_requirements/tpu-post-train-requirements.txt`).
78
70
79
71
## Step 2: Find the JAX build commit hash
80
72
81
-
The dependency generation process is pinned to a specific nightly build of JAX.
82
-
You need to find the commit hash for the desired JAX build.
a recent, successful build and copy its full commit hash.
73
+
The dependency generation process is pinned to a specific nightly build of JAX. You need to find the commit hash for the desired JAX build from [JAX `build/` folder](https://github.com/jax-ml/jax/commits/main/build) and copy its full commit hash.
87
74
88
75
## Step 3: Generate the requirements files
89
76
90
77
Next, run the `seed-env` CLI to generate the new requirements files. You will
91
78
need to do this separately for the TPU and GPU environments. The generated files
92
79
will be placed in a directory specified by `--output-dir`.
93
80
94
-
### For TPU
81
+
> **Note:** The current `src/dependencies/requirements/generated_requirements/` in the repository were generated using JAX build commit hash: [e0d2967b50abbefd651d563dbcd7afbcb963d08c](https://github.com/jax-ml/jax/commit/e0d2967b50abbefd651d563dbcd7afbcb963d08c).
82
+
83
+
### TPU Pre-Training
95
84
96
-
Run the following command, replacing `<jax-build-commit-hash>` with the hash you
97
-
copied in the previous step.
85
+
If you have made changes to TPU pre-training dependencies in `src/dependencies/requirements/base_requirements/tpu-requirements.txt`, you need to regenerate the pinned pre-training requirements in `generated_requirements/` directory. Run the following command, replacing `<jax-build-commit-hash>` with the hash you copied in the previous step:
98
86
99
87
```bash
100
88
seed-env \
@@ -104,45 +92,51 @@ seed-env \
104
92
--python-version=3.12 \
105
93
--requirements-txt=tpu-requirements.txt \
106
94
--output-dir=generated_tpu_artifacts
95
+
96
+
# Copy generated requirements to src/dependencies/requirements/generated_requirements
Similarly, run the command for the GPU requirements.
102
+
If you have made changes to the post-training dependencies in `src/dependencies/requirements/base_requirements/tpu-post-train-requirements.txt`, you need to regenerate the pinned post-training requirements in `generated_requirements/` directory. Run the following command, replacing `<jax-build-commit-hash>` with the hash you copied in the previous step:
After generating the new requirements, you need to update the files in the
127
-
MaxText repository.
117
+
### GPU Pre-Training
128
118
129
-
1.**Copy the generated files:**
119
+
If you have made changes to the GPU pre-training dependencies in `src/dependencies/requirements/base_requirements/cuda12-requirements.txt`, you need to regenerate the pinned pre-training requirements in `generated_requirements/` directory. Run the following command, replacing `<jax-build-commit-hash>` with the hash you copied in the previous step:
130
120
131
-
- Move `generated_tpu_artifacts/tpu-requirements.txt` to `generated_requirements/tpu-requirements.txt`.
132
-
- Move `generated_gpu_artifacts/cuda12-requirements.txt` to `generated_requirements/cuda12-requirements.txt`.
Finally, test that the new dependencies install correctly and that MaxText runs
143
138
as expected.
144
139
145
-
1.**Install MaxText:** Follow the instructions to
146
-
[install MaxText from source](install-from-source).
140
+
1.**Install MaxText and dependencies**: For instructions on installing MaxText on your VM, please refer to the [official documentation](https://maxtext.readthedocs.io/en/latest/install_maxtext.html#from-source).
147
141
148
142
2.**Run tests:** Run MaxText tests to ensure there are no regressions.
0 commit comments