File tree Expand file tree Collapse file tree 4 files changed +201
-131
lines changed
examples/models/llama3_2_vision/preprocess Expand file tree Collapse file tree 4 files changed +201
-131
lines changed Original file line number Diff line number Diff line change @@ -231,6 +231,34 @@ jobs:
231231 # run e2e (export, tokenizer and runner)
232232 PYTHON_EXECUTABLE=python bash .ci/scripts/test_llava.sh
233233
234+ test-preprocess-linux :
235+ name : test-preprocess-linux
236+ uses : pytorch/test-infra/.github/workflows/linux_job.yml@main
237+ strategy :
238+ fail-fast : false
239+ with :
240+ runner : linux.24xlarge
241+ docker-image : executorch-ubuntu-22.04-clang12
242+ submodules : ' true'
243+ ref : ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
244+ timeout : 90
245+ script : |
246+ # The generic Linux job chooses to use base env, not the one setup by the image
247+ CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
248+ conda activate "${CONDA_ENV}"
249+
250+ PYTHON_EXECUTABLE=python bash .ci/scripts/setup-linux.sh "cmake"
251+
252+ # install pybind
253+ bash install_requirements.sh --pybind xnnpack
254+
255+ # install preprocess requirements
256+ bash examples/models/llama3_2_vision/install_requirements.sh
257+
258+ # run python unittest
259+ pytest -c /dev/null -v -n auto examples/models/llama3_2_vision/preprocess/
260+
261+
234262 test-quantized-aot-lib-linux :
235263 name : test-quantized-aot-lib-linux
236264 uses : pytorch/test-infra/.github/workflows/linux_job.yml@main
Original file line number Diff line number Diff 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
3134class CLIPImageTransformModel (EagerModelBase ):
You can’t perform that action at this time.
0 commit comments