Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

Commit d2fb140

Browse files
committed
Install ET nightly and bump up ET version to 20241017
Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags:
1 parent 8fcb3ba commit d2fb140

File tree

3 files changed

+23
-28
lines changed

3 files changed

+23
-28
lines changed

install/.pins/et-pin.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
286799c9c844ce6427b8eca260f9b2f28be03291
1+
2024-10-17

install/install_requirements.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ fi
4747
# NOTE: If a newly-fetched version of the executorch repo changes the value of
4848
# PYTORCH_NIGHTLY_VERSION, you should re-run this script to install the necessary
4949
# package versions.
50-
PYTORCH_NIGHTLY_VERSION=dev20240901
50+
PYTORCH_NIGHTLY_VERSION=dev20241007
5151

5252
# Nightly version for torchvision
53-
VISION_NIGHTLY_VERSION=dev20240901
53+
VISION_NIGHTLY_VERSION=dev20241007
5454

5555
# Nightly version for torchtune
56-
TUNE_NIGHTLY_VERSION=dev20240928
56+
TUNE_NIGHTLY_VERSION=dev20241007
5757

5858
# Uninstall triton, as nightly will depend on pytorch-triton, which is one and the same
5959
(
@@ -73,9 +73,9 @@ fi
7373

7474
# pip packages needed by exir.
7575
REQUIREMENTS_TO_INSTALL=(
76-
torch=="2.5.0.${PYTORCH_NIGHTLY_VERSION}"
76+
torch=="2.6.0.${PYTORCH_NIGHTLY_VERSION}"
7777
torchvision=="0.20.0.${VISION_NIGHTLY_VERSION}"
78-
torchtune=="0.3.0.${TUNE_NIGHTLY_VERSION}"
78+
torchtune=="0.4.0.${TUNE_NIGHTLY_VERSION}"
7979
)
8080

8181
# Install the requirements. --extra-index-url tells pip to look for package

torchchat/utils/scripts/install_utils.sh

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,24 @@ function find_cmake_prefix_path() {
2727
MY_CMAKE_PREFIX_PATH=$path
2828
}
2929

30+
31+
function get_executorch_commit_hash_pin() {
32+
# Assuming inside executorch
33+
nightly_str=$(cat ${TORCHCHAT_ROOT}/install/.pins/et-pin.txt)
34+
nightly_commit_hash=$(git log origin/nightly --format=%H --grep="${nightly_str} nightly release")
35+
echo "Nightly commit hash: ${nightly_commit_hash}"
36+
}
37+
3038
clone_executorch_internal() {
3139
rm -rf ${TORCHCHAT_ROOT}/${ET_BUILD_DIR}/src
3240

3341
mkdir -p ${TORCHCHAT_ROOT}/${ET_BUILD_DIR}/src
3442
pushd ${TORCHCHAT_ROOT}/${ET_BUILD_DIR}/src
3543
git clone https://github.com/pytorch/executorch.git
3644
cd executorch
37-
git checkout $(cat ${TORCHCHAT_ROOT}/install/.pins/et-pin.txt)
45+
get_executorch_commit_hash_pin
46+
47+
git checkout "$nightly_commit_hash"
3848
echo "Install ExecuTorch: submodule update"
3949
git submodule sync
4050
git submodule update --init
@@ -60,9 +70,9 @@ clone_executorch() {
6070

6171
# Check if the version is the same
6272
current_version=$(git rev-parse HEAD)
63-
desired_version=$(cat ${TORCHCHAT_ROOT}/install/.pins/et-pin.txt)
73+
get_executorch_commit_hash_pin
6474

65-
if [ "$current_version" == "$desired_version" ]; then
75+
if [ "$current_version" == "$nightly_commit_hash" ]; then
6676
echo "ExecuTorch is already cloned with the correct version. Skipping clone."
6777
popd
6878
return
@@ -77,31 +87,16 @@ clone_executorch() {
7787

7888

7989
install_executorch_python_libs() {
80-
if [ ! -d "${TORCHCHAT_ROOT}/${ET_BUILD_DIR}" ]; then
81-
echo "Directory ${TORCHCHAT_ROOT}/${ET_BUILD_DIR} does not exist."
82-
echo "Make sure you run clone_executorch"
83-
exit 1
84-
fi
85-
pushd ${TORCHCHAT_ROOT}/${ET_BUILD_DIR}/src
86-
cd executorch
87-
88-
echo "Building and installing python libraries"
89-
if [ "${ENABLE_ET_PYBIND}" = false ]; then
90-
echo "Not installing pybind"
91-
bash ./install_requirements.sh
92-
else
93-
echo "Installing pybind"
94-
bash ./install_requirements.sh --pybind xnnpack
95-
fi
96-
90+
NIGHTLY=$(cat ${TORCHCHAT_ROOT}/install/.pins/et-pin.txt | tr -d "-")
91+
echo "Installing ExecuTorch nightly 0.5.0.dev${NIGHTLY}"
92+
pip install executorch=="0.5.0.dev${NIGHTLY}" --extra-index-url https://download.pytorch.org/whl/nightly/cpu
9793
# TODO: figure out the root cause of 'AttributeError: module 'evaluate'
9894
# has no attribute 'utils'' error from evaluate CI jobs and remove
9995
# `import lm_eval` from torchchat.py since it requires a specific version
10096
# of numpy.
10197
pip install numpy=='1.26.4'
10298

103-
pip3 list
104-
popd
99+
pip list
105100
}
106101

107102
COMMON_CMAKE_ARGS="\

0 commit comments

Comments
 (0)