Skip to content

[train][release] Get correct dreambooth requirements.txt#62525

Merged
matthewdeng merged 5 commits intoray-project:masterfrom
TimothySeah:tseah/fix-dreambooth-release
Apr 16, 2026
Merged

[train][release] Get correct dreambooth requirements.txt#62525
matthewdeng merged 5 commits intoray-project:masterfrom
TimothySeah:tseah/fix-dreambooth-release

Conversation

@TimothySeah
Copy link
Copy Markdown
Contributor

@TimothySeah TimothySeah commented Apr 11, 2026

Summary

This PR fixes pip jax dependency issues in our dreambooth release test. Original error:


Collecting jax==0.4.13 (from -r dreambooth/requirements.txt (line 7))
--
Downloading jax-0.4.13.tar.gz (1.3 MB)
���������������������������������������� 1.3/1.3 MB 59.5 MB/s eta 0:00:00
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'done'
ERROR: Ignored the following yanked versions: 0.4.32
ERROR: Ignored the following versions that require a different python version: 0.11.0 Requires-Python >=3.11; 0.11.1 Requires-Python >=3.11; 0.11.2 Requires-Python >=3.11; 0.12.0 Requires-Python >=3.11; 0.12.1 Requires-Python >=3.11; 0.12.2 Requires-Python >=3.11; 0.12.3 Requires-Python >=3.11; 0.12.4 Requires-Python >=3.11; 0.12.5 Requires-Python >=3.11; 0.12.6 Requires-Python >=3.11; 0.7.0 Requires-Python >=3.11; 0.7.1 Requires-Python >=3.11; 0.7.2 Requires-Python >=3.11; 0.8.0 Requires-Python >=3.11; 0.8.1 Requires-Python >=3.11; 0.8.2 Requires-Python >=3.11; 0.8.3 Requires-Python >=3.11; 0.9.0 Requires-Python >=3.11; 0.9.0.1 Requires-Python >=3.11; 0.9.1 Requires-Python >=3.11; 0.9.2 Requires-Python >=3.11
ERROR: Could not find a version that satisfies the requirement jaxlib==0.4.13 (from versions: 0.4.17, 0.4.18, 0.4.19, 0.4.20, 0.4.21, 0.4.22, 0.4.23, 0.4.24, 0.4.25, 0.4.26, 0.4.27, 0.4.28, 0.4.29, 0.4.30, 0.4.31, 0.4.33, 0.4.34, 0.4.35, 0.4.36, 0.4.38, 0.5.0, 0.5.1, 0.5.3, 0.6.0, 0.6.1, 0.6.2)
ERROR: No matching distribution found for jaxlib==0.4.13
Subprocess return code: 1

I did the following:

  1. Created new python3.9 conda env
  2. Ran pip-compile release/air_examples/dreambooth/dreambooth/requirements.txt --output-file=requirements.test.txt. This indeed failed with pip._internal.exceptions.DistributionNotFound: No matching distribution found for jaxlib==0.4.13
  3. Relaxed the jax, jaxlib and flax requirements in requirements.txt
  4. Ran pip-compile release/air_examples/dreambooth/dreambooth/requirements.txt --output-file=requirements.test.txt again. Here is the result: https://gist.github.com/TimothySeah/5a5e345d581d0b7f97162a4e3a494edb
  5. Copied the jax, jaxlib, and flax versions back to requirements.txt

But then that resulted in some dependency issues still: https://buildkite.com/ray-project/release/builds/88314#019d7a74-9760-4595-b080-72d0797c2f4b i.e. ImportError: cannot import name 'cached_download' from 'huggingface_hub'

I repeated the process above but unpinned all the deps this time, which produced this file: https://gist.github.com/TimothySeah/58f928b7d1d611b5ff88d383934e2b5f. I then updated requirements.txt to match. But that was even worse: https://buildkite.com/ray-project/release/builds/88650#019d8961-6343-420f-a3cc-dbb33786b18f.

I went back to the first change but only downgraded huggingface_hub to a version that contains cached_download. Now there's a version mismatch between diffusers and jax: https://buildkite.com/ray-project/release/builds/88671#019d899f-1699-4e39-8b10-9b38effda088

Taking a step back, I see that the from versions log mentions jax 0.4.17 onwards, implying that jax 0.4.13 is no longer supported on my python/cuda setup. Therefore I tried changing it to jax 0.4.17, which produced this requirements file: https://gist.github.com/TimothySeah/465b0b09d46531216fbd9162a183738e. Back to the cached_download error: https://buildkite.com/ray-project/release/builds/88884#019d8e89-b998-48b1-8d8d-7761de4ca484.

Now I'm trying an older huggingface_hub that supports cached_download.

Testing

Release tests with name:air_example_dreambooth_finetuning.*

@TimothySeah TimothySeah marked this pull request as ready for review April 11, 2026 02:25
@TimothySeah TimothySeah requested a review from a team as a code owner April 11, 2026 02:25
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the jax and jaxlib dependencies to version 0.4.38 in the Dreambooth template. A review comment identifies a potential compatibility issue where the current flax version (0.6.11) is likely incompatible with the updated JAX versions, suggesting an update to flax (e.g., 0.10.x) to ensure environment stability.

Comment thread doc/source/templates/05_dreambooth_finetuning/dreambooth/requirements.txt Outdated
Comment thread doc/source/templates/05_dreambooth_finetuning/dreambooth/requirements.txt Outdated
Signed-off-by: Timothy Seah <tseah@anyscale.com>
@TimothySeah TimothySeah force-pushed the tseah/fix-dreambooth-release branch from 6c960f7 to b9ad606 Compare April 11, 2026 02:46
@ray-gardener ray-gardener bot added train Ray Train Related Issue release-test release test labels Apr 11, 2026
Signed-off-by: Timothy Seah <tseah@anyscale.com>
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

Reviewed by Cursor Bugbot for commit 99de864. Configure here.

Comment thread doc/source/templates/05_dreambooth_finetuning/dreambooth/requirements.txt Outdated
Comment thread doc/source/templates/05_dreambooth_finetuning/dreambooth/requirements.txt Outdated
Signed-off-by: Timothy Seah <tseah@anyscale.com>
Signed-off-by: Timothy Seah <tseah@anyscale.com>
Signed-off-by: Timothy Seah <tseah@anyscale.com>
@sai-miduthuri sai-miduthuri added the go add ONLY when ready to merge, run all tests label Apr 16, 2026
@matthewdeng matthewdeng enabled auto-merge (squash) April 16, 2026 23:11
@matthewdeng matthewdeng merged commit a01c1cb into ray-project:master Apr 16, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go add ONLY when ready to merge, run all tests release-test release test train Ray Train Related Issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants