Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .ci/scripts/test_model.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,14 @@ test_model() {
return
fi

if [[ "${MODEL_NAME}" == "yolo26" ]]; then

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could maybe do it more generic with something like this?

if [[ -f "examples/models/${MODEL_NAME}/requirements.txt" ]]; then
"${PYTHON_EXECUTABLE}" -m pip install --upgrade-strategy only-if-needed -r examples/models/${MODEL_NAME}/requirements.txt
fi

But then we need to have one to one mapping for models and folders so it might not work in all cases.

# Install yolo26 requirements (ultralytics). torch/torchvision are already
# installed and satisfy ultralytics, so only-if-needed leaves them as-is.
# No pytorch extra-index-url: it is unused here and would broaden pip's
# version resolution across all deps.
"${PYTHON_EXECUTABLE}" -m pip install --upgrade-strategy only-if-needed -r examples/models/yolo26/requirements.txt
Comment on lines +131 to +135
fi

# Export a basic .pte and run the model.
"${PYTHON_EXECUTABLE}" -m examples.portable.scripts.export --model_name="${MODEL_NAME}" "${STRICT}"
run_portable_executor_runner
Expand Down
Loading