File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,17 @@ run: |
5454 pip install -U "lightning-thunder[test] @ git+https://github.com/Lightning-AI/lightning-thunder.git" "torch==${TORCH_VERSION}"
5555 # Pin transformers to match thunder's test_networks.py requirements
5656 # See: https://github.com/Lightning-AI/lightning-thunder/blob/main/requirements/test.txt
57- pip install transformers==4.52.4 # todo: find more robust way
57+ # Get transformers version from thunder requirements
58+ TRANSFORMERS_VERSION=$(curl -fsSL https://raw.githubusercontent.com/Lightning-AI/lightning-thunder/main/requirements/test.txt \
59+ | grep '^transformers==' \
60+ | cut -d'=' -f3 \
61+ | cut -d'#' -f1 \
62+ | xargs)
63+ if [ -z "${TRANSFORMERS_VERSION}" ]; then
64+ echo "Error: Could not determine transformers version from lightning-thunder requirements"
65+ exit 1
66+ fi
67+ pip install transformers==${TRANSFORMERS_VERSION}
5868 # without env var, it filters out all tests
5969 RUN_ONLY_CUDA_TESTS=0 pytest tests/ext_thunder/test_thunder_networks.py -v
6070 fi
You can’t perform that action at this time.
0 commit comments