Skip to content

Commit 9b5f09a

Browse files
committed
Add preprocess to ci
ghstack-source-id: 7cc5fc2 Pull Request resolved: #6544
1 parent d4a9ca0 commit 9b5f09a

File tree

5 files changed

+182
-131
lines changed

5 files changed

+182
-131
lines changed

.github/workflows/_unittest.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ jobs:
3737
CMAKE_ARGS="-DEXECUTORCH_BUILD_XNNPACK=ON -DEXECUTORCH_BUILD_KERNELS_QUANTIZED=ON" \
3838
.ci/scripts/setup-linux.sh cmake
3939
40+
# Install llama3_2_vision dependencies.
41+
bash examples/models/llama3_2_vision/install_requirements.sh
42+
4043
# Run pytest with coverage
4144
pytest -n auto --cov=./ --cov-report=xml
4245
# Run gtest
@@ -67,6 +70,9 @@ jobs:
6770
${CONDA_RUN} --no-capture-output \
6871
.ci/scripts/setup-macos.sh cmake
6972
73+
# Install llama3_2_vision dependencies.
74+
bash examples/models/llama3_2_vision/install_requirements.sh
75+
7076
# Run pytest with coverage
7177
${CONDA_RUN} pytest -n auto --cov=./ --cov-report=xml
7278
# Run gtest

examples/models/llama3_2_vision/install_requirements.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@
66
# LICENSE file in the root directory of this source tree.
77

88
# Install torchtune nightly for model definitions.
9+
echo "lfq check pip"
10+
pip list # debugging
911
pip install --pre torchtune --extra-index-url https://download.pytorch.org/whl/nightly/cpu --no-cache-dir
1012

1113
# Install torchao.
14+
pip list # debugging
1215
TORCHAO_VERSION=$(cat "$(dirname "$0")"/../../../.ci/docker/ci_commit_pins/torchao.txt)
1316
pip install --no-use-pep517 "git+https://github.com/pytorch/ao.git@${TORCHAO_VERSION}"

examples/models/llama3_2_vision/preprocess/model.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ class PreprocessConfig:
2626
max_num_tiles: int = 4
2727
tile_size: int = 224
2828
antialias: bool = False
29+
# Used for reference eager model from torchtune.
30+
resize_to_max_canvas: bool = False
31+
possible_resolutions: Optional[List[Tuple[int, int]]] = None
2932

3033

3134
class CLIPImageTransformModel(EagerModelBase):

0 commit comments

Comments
 (0)