@@ -800,11 +800,26 @@ jobs:
800
800
echo "Recipe: $RECIPE"
801
801
echo "Quantize: $QUANTIZE"
802
802
803
- echo "::group::Set up ExecuTorch"
804
803
# The generic Linux job chooses to use base env, not the one setup by the image
805
804
CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
806
805
conda activate "${CONDA_ENV}"
807
- PYTHON_EXECUTABLE=python bash .ci/scripts/setup-linux.sh --build-tool cmake
806
+
807
+ echo "::group::Setup ExecuTorch"
808
+ PYTHON_EXECUTABLE=python bash .ci/scripts/setup-linux.sh --build-tool "cmake"
809
+ echo "::endgroup::"
810
+
811
+ echo "::group::Setup Huggingface"
812
+ pip install -U "huggingface_hub[cli]" accelerate
813
+ huggingface-cli login --token $SECRET_EXECUTORCH_HF_TOKEN
814
+ OPTIMUM_ET_VERSION=$(cat .ci/docker/ci_commit_pins/optimum-executorch.txt)
815
+ pip install git+https://github.com/huggingface/optimum-executorch.git@${OPTIMUM_ET_VERSION}
816
+ echo "::endgroup::"
817
+
818
+ echo "::group::Test MODEL: $MODEL RECIPE: $RECIPE QUANTIZE: $QUANTIZE"
819
+ export OUTPUT_DIR="$(pwd)/${MODEL}_${RECIPE}_${QUANTIZE}"
820
+ python .ci/scripts/test_huggingface_optimum_model.py --model "$MODEL" --recipe "$RECIPE" $QUANTIZE --model_dir "$OUTPUT_DIR"
821
+ echo "::endgroup::"
822
+
808
823
# Build executor_runner with ETdump enabled
809
824
PYTHON_EXECUTABLE=python cmake -DPYTHON_EXECUTABLE=python \
810
825
-DCMAKE_INSTALL_PREFIX=cmake-out \
@@ -822,25 +837,6 @@ jobs:
822
837
-DEXECUTORCH_ENABLE_EVENT_TRACER=ON \
823
838
-Bcmake-out .
824
839
cmake --build cmake-out -j16 --target install --config Release
825
- echo "::endgroup::"
826
-
827
- echo "::group::Set up Hugging Face"
828
- pip install -U "huggingface_hub[cli]"
829
- huggingface-cli login --token $SECRET_EXECUTORCH_HF_TOKEN
830
- OPTIMUM_ET_COMMIT=$(cat .ci/docker/ci_commit_pins/optimum-executorch.txt)
831
- git clone https://github.com/huggingface/optimum-executorch
832
- pushd optimum-executorch
833
- # There is no release yet, for CI stability, always test from the same commit on main
834
- git checkout $OPTIMUM_ET_COMMIT
835
- python install_dev.py --skip_override_torch
836
- popd
837
- pip list
838
- echo "::endgroup::"
839
-
840
- echo "::group::Run tests"
841
- export OUTPUT_DIR="$(pwd)/${MODEL}_${RECIPE}_${QUANTIZE}"
842
- python .ci/scripts/test_huggingface_optimum_model.py --model ${MODEL} --recipe ${RECIPE} ${QUANTIZE} --model_dir ${OUTPUT_DIR}
843
- echo "::endgroup::"
844
840
845
841
echo "::group::Generate artifacts for performance profiling"
846
842
./cmake-out/executor_runner \
@@ -907,16 +903,11 @@ jobs:
907
903
${CONDA_RUN} python install_executorch.py
908
904
echo "::endgroup::"
909
905
910
- echo "::group::Set up Hugging Face"
911
- pip install -U "huggingface_hub[cli]"
912
- huggingface-cli login --token $SECRET_EXECUTORCH_HF_TOKEN
913
- OPTIMUM_ET_COMMIT=$(cat .ci/docker/ci_commit_pins/optimum-executorch.txt)
914
- git clone https://github.com/huggingface/optimum-executorch
915
- pushd optimum-executorch
916
- # There is no release yet, for CI stability, always test from the same commit on main
917
- git checkout $OPTIMUM_ET_COMMIT
918
- ${CONDA_RUN} python install_dev.py --skip_override_torch
919
- popd
906
+ echo "::group::Set up Huggingface"
907
+ ${CONDA_RUN} pip install -U "huggingface_hub[cli]" accelerate
908
+ ${CONDA_RUN} huggingface-cli login --token $SECRET_EXECUTORCH_HF_TOKEN
909
+ OPTIMUM_ET_VERSION=$(cat .ci/docker/ci_commit_pins/optimum-executorch.txt)
910
+ ${CONDA_RUN} pip install git+https://github.com/huggingface/optimum-executorch.git@${OPTIMUM_ET_VERSION}
920
911
${CONDA_RUN} pip list
921
912
echo "::endgroup::"
922
913
0 commit comments