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

Commit ec7b510

Browse files
authored
Fix test-cpu-eval-sanity-check-* CI jobs broken due to "evaluate" module conflicts (#1215)
* Fix eval sanity check CI Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags: * Fixate psutil to 6.0.0 Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags: * Pre-import evaluate Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags: * Force install evaluate Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags: * Revert test-cpu-eval-sanity-check-float32 changes since it breaks AOTI Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags: * Remove debug log Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags: * Cleanup Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags: * Remove redundant import Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags: * Ok can't remove import lm_eval. Move it inside eval condition Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags: * Add file hash to cache key Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags: * Update cache key for runner-et Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags:
1 parent ae3555b commit ec7b510

File tree

4 files changed

+14
-9
lines changed

4 files changed

+14
-9
lines changed

.github/workflows/pull.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -904,14 +904,12 @@ jobs:
904904
echo "et-git-hash=$(cat ${TORCHCHAT_ROOT}/install/.pins/et-pin.txt)" >> "$GITHUB_ENV"
905905
- name: Load or install ET
906906
id: install-et
907-
uses: actions/cache@v3
908-
env:
909-
cache-key: et-build-${{runner.os}}-${{runner.arch}}-${{env.et-git-hash}}
907+
uses: actions/cache@v4
910908
with:
911-
path: ./et-build
912-
key: ${{env.cache-key}}
913-
restore-keys: |
914-
${{env.cache-key}}
909+
path: |
910+
./et-build
911+
./torchchat/utils/scripts
912+
key: et-build-${{runner.os}}-${{runner.arch}}-${{env.et-git-hash}}-${{ hashFiles('**/install_et.sh') }}
915913
- if: ${{ steps.install-et.outputs.cache-hit != 'true' }}
916914
continue-on-error: true
917915
run: |

install/install_requirements.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,5 +103,5 @@ fi
103103

104104
(
105105
set -x
106-
$PIP_EXECUTABLE install lm-eval=="0.4.2"
106+
$PIP_EXECUTABLE install evaluate=="0.4.3" lm-eval=="0.4.2" psutil=="6.0.0"
107107
)

torchchat/model.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@
3030
SequenceParallel,
3131
)
3232
from torch.nn import functional as F
33-
33+
# TODO: remove this after we figure out where in torchtune an `evaluate` module
34+
# is being imported, which is being confused with huggingface's `evaluate``.
35+
import lm_eval # noqa
3436
from torchtune.models.clip import clip_vision_encoder
3537
from torchtune.models.llama3_1._component_builders import llama3_1 as llama3_1_builder
3638
from torchtune.models.llama3_2_vision._component_builders import (

torchchat/utils/scripts/install_et.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,9 @@ find_cmake_prefix_path
2020
clone_executorch
2121
install_executorch_libs $ENABLE_ET_PYBIND
2222
install_executorch_python_libs $ENABLE_ET_PYBIND
23+
# TODO: figure out the root cause of 'AttributeError: module 'evaluate'
24+
# has no attribute 'utils'' error from evaluate CI jobs and remove
25+
# `import lm_eval` from torchchat.py since it requires a specific version
26+
# of numpy.
27+
pip install numpy=='1.26.4'
2328
popd

0 commit comments

Comments
 (0)