Repository navigation
[Studio] Install flash attn at setup time for linux - #4979
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors wheel utility functions into a dedicated module and introduces an automated installer for flash-attn within the Python stack setup. The new installer supports prebuilt wheel detection for various Torch versions and falls back to source builds if necessary. Feedback includes a suggestion to use the _build_uv_cmd helper to ensure the --system flag is correctly applied when installing via uv, and a recommendation to avoid silent broad exception handling in URL probing.
|
This has the potential to increase setup time by up to 40 mins. Not something users would be happy to see imho, hence why i initially excluded it. |
7aa1bf8 to
540171c
Compare
resolved already . |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 10625a1252
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| sys.executable, | ||
| pypi_spec, | ||
| ] | ||
| else: | ||
| pypi_cmd = [sys.executable, "-m", "pip", "install", pypi_spec] |
There was a problem hiding this comment.
Avoid dependency-resolving flash-attn runtime fallback
When the direct wheel path is unavailable (e.g., unsupported Torch/CUDA combo on Linux long-context jobs), this fallback installs flash-attn from PyPI without --no-deps or a pinned version. In that case pip/uv may resolve and change core packages (notably torch) inside the training environment before the job starts, which can introduce long resolver/download delays and ABI mismatches with already-installed extensions. The existing causal-conv1d/mamba flow explicitly uses dependency-isolated installs, so this new fallback should do the same.
Useful? React with 👍 / 👎.

No description provided.