Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .ci/scripts/setup-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ fi
# of nightly. This allows CI to test against latest commits from PyTorch
install_executorch "use-pt-pinned-commit"
build_executorch_runner "${BUILD_TOOL}"
do_not_use_nightly_on_ci
18 changes: 17 additions & 1 deletion .ci/scripts/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,26 @@ cmake_install_executorch_lib() {
}

download_stories_model_artifacts() {
# Download stories110M.pt and tokenizer from Github
# Download stories110M.pt and tokenizer from Github
curl -Ls "https://huggingface.co/karpathy/tinyllamas/resolve/main/stories110M.pt" --output stories110M.pt
curl -Ls "https://raw.githubusercontent.com/karpathy/llama2.c/master/tokenizer.model" --output tokenizer.model
# Create params.json file
touch params.json
echo '{"dim": 768, "multiple_of": 32, "n_heads": 12, "n_layers": 12, "norm_eps": 1e-05, "vocab_size": 32000}' > params.json
}

do_not_use_nightly_on_ci() {
# An assert to make sure that we are not using PyTorch nightly on CI to prevent
# regression as documented in https://github.com/pytorch/executorch/pull/6564
TORCH_VERSION=$(pip list | grep -w 'torch ' | awk -F ' ' {'print $2'} | tr -d '\n')

# The version of PyTorch building from source looks like 2.6.0a0+gitc8a648d that
# includes the commit while nightly (2.6.0.dev20241019+cpu) or release (2.6.0)
# won't have that. Note that we couldn't check for the exact commit from the pin
# ci_commit_pins/pytorch.txt here because the value will be different when running
# this on PyTorch CI
if [[ "${TORCH_VERSION}" != *"+git"* ]]; then
echo "Unexpected torch version. Expected binary built from source, got ${TORCH_VERSION}"
exit 1
fi
}
Loading