Skip to content

Commit 78ad983

Browse files
Merge pull request #3276 from AI-Hypercomputer:bvandermoon-post-train-dependencies
PiperOrigin-RevId: 876460857
2 parents 0955203 + 0175078 commit 78ad983

2 files changed

Lines changed: 21 additions & 2 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ packages = ["src/MaxText", "src/maxtext", "src/install_maxtext_extra_deps"]
4848
[project.scripts]
4949
install_maxtext_tpu_github_deps = "install_maxtext_extra_deps.install_github_deps:main"
5050
install_maxtext_cuda12_github_deps = "install_maxtext_extra_deps.install_github_deps:main"
51-
install_maxtext_tpu_post_train_github_deps = "install_maxtext_extra_deps.install_post_train_github_deps:main"
51+
install_maxtext_tpu_post_train_extra_deps = "install_maxtext_extra_deps.install_post_train_extra_deps:main"

src/install_maxtext_extra_deps/install_post_train_github_deps.py renamed to src/install_maxtext_extra_deps/install_post_train_extra_deps.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,18 +65,37 @@ def main():
6565
"--no-deps",
6666
]
6767

68+
local_vllm_install_command = [
69+
sys.executable, # Use the current Python executable's pip to ensure the correct environment
70+
"-m",
71+
"uv",
72+
"pip",
73+
"install",
74+
"src/MaxText/integration/vllm",
75+
"--no-deps",
76+
]
77+
6878
print(f"Installing extra dependencies from '{extra_deps_file}' using uv...")
6979
print(f"Running command: {' '.join(command)}")
7080

7181
try:
72-
# Run the command
82+
# Run the command to install Github dependencies
7383
process = subprocess.run(command, check=True, capture_output=True, text=True)
7484
print("Extra dependencies installed successfully!")
7585
print("--- Output from uv ---")
7686
print(process.stdout)
7787
if process.stderr:
7888
print("--- Errors/Warnings from uv (if any) ---")
7989
print(process.stderr)
90+
91+
# Run the command to install the MaxText vLLM directory
92+
vllm_install_process = subprocess.run(local_vllm_install_command, check=True, capture_output=True, text=True)
93+
print("MaxText vLLM dependency installed successfully!")
94+
print("--- Output from uv ---")
95+
print(vllm_install_process.stdout)
96+
if vllm_install_process.stderr:
97+
print("--- Errors/Warnings from uv (if any) ---")
98+
print(vllm_install_process.stderr)
8099
except subprocess.CalledProcessError as e:
81100
print("Failed to install extra dependencies.")
82101
print(f"Command '{' '.join(e.cmd)}' returned non-zero exit status {e.returncode}.")

0 commit comments

Comments
 (0)