Skip to content

[Backport 2.x] Allow method parameter override for training based ind… #4834

[Backport 2.x] Allow method parameter override for training based ind…

[Backport 2.x] Allow method parameter override for training based ind… #4834

name: Backwards Compatibility Tests k-NN
on:
push:
branches:
- "*"
- "feature/**"
paths:
- 'build.gradle'
- 'settings.gradle'
- 'src/**'
- 'build-tools/**'
- 'buildSrc/**'
- 'gradle/**'
- 'jni/**'
- 'qa/**'
- '.github/workflows/backwards_compatibility_tests_workflow.yml'
pull_request:
branches:
- "*"
- "feature/**"
paths:
- 'build.gradle'
- 'settings.gradle'
- 'src/**'
- 'build-tools/**'
- 'buildSrc/**'
- 'gradle/**'
- 'jni/**'
- 'qa/**'
- '.github/workflows/backwards_compatibility_tests_workflow.yml'
jobs:
Restart-Upgrade-BWCTests-k-NN:
strategy:
matrix:
java: [ 11, 17 ]
bwc_version : [ "1.1.0", "1.2.4", "1.3.8", "2.0.1", "2.1.0", "2.2.1", "2.3.0", "2.4.1", "2.5.0", "2.6.0", "2.7.0", "2.8.0", "2.9.0", "2.10.0", "2.11.0", "2.12.0", "2.13.0", "2.14.0", "2.15.0", "2.16.0", "2.17.0", "2.18.0" ]
opensearch_version : [ "2.19.0-SNAPSHOT" ]
name: k-NN Restart-Upgrade BWC Tests
runs-on: ubuntu-latest
env:
BWC_VERSION_RESTART_UPGRADE: ${{ matrix.bwc_version }}
steps:
- name: Checkout k-NN
uses: actions/checkout@v1
# Setup git user so that patches for native libraries can be applied and committed
- name: Setup git user
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Setup Java ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Install dependencies
run: |
sudo apt-get install libopenblas-dev gfortran -y
- name: Run k-NN Restart-Upgrade BWC Tests from BWCVersion-${{ matrix.bwc_version }} to OpenSearch Version-${{ matrix.opensearch_version }}
run: |
echo "Running restart-upgrade backwards compatibility tests ..."
if lscpu | grep -i avx512f | grep -i avx512cd | grep -i avx512vl | grep -i avx512dq | grep -i avx512bw
then
echo "avx512 available on system"
./gradlew :qa:restart-upgrade:testRestartUpgrade -Dtests.bwc.version=$BWC_VERSION_RESTART_UPGRADE -Dnproc.count=`nproc`
elif lscpu | grep -i avx2
then
echo "avx2 available on system"
./gradlew :qa:restart-upgrade:testRestartUpgrade -Dtests.bwc.version=$BWC_VERSION_RESTART_UPGRADE -Dnproc.count=`nproc` -Davx512.enabled=false
else
echo "avx512 and avx2 not available on system"
./gradlew :qa:restart-upgrade:testRestartUpgrade -Dtests.bwc.version=$BWC_VERSION_RESTART_UPGRADE -Davx2.enabled=false -Davx512.enabled=false -Dsimd.enabled=false -Dnproc.count=`nproc`
fi
Rolling-Upgrade-BWCTests-k-NN:
strategy:
matrix:
java: [ 11, 17 ]
bwc_version: [ "1.3.8", "2.0.1", "2.1.0", "2.2.1", "2.3.0", "2.4.1", "2.5.0", "2.6.0", "2.7.0", "2.8.0", "2.9.0", "2.10.0", "2.11.0", "2.12.0", "2.13.0", "2.14.0", "2.15.0", "2.16.0", "2.17.0", "2.18.0"]
opensearch_version: [ "2.19.0-SNAPSHOT" ]
name: k-NN Rolling-Upgrade BWC Tests
runs-on: ubuntu-latest
env:
BWC_VERSION_ROLLING_UPGRADE: ${{ matrix.bwc_version }}
steps:
- name: Checkout k-NN
uses: actions/checkout@v1
# Setup git user so that patches for native libraries can be applied and committed
- name: Setup git user
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Setup Java ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Install dependencies
run: |
sudo apt-get install libopenblas-dev gfortran -y
- name: Run k-NN Rolling-Upgrade BWC Tests from BWCVersion-${{ matrix.bwc_version }} to OpenSearch Version-${{ matrix.opensearch_version }}
run: |
echo "Running rolling-upgrade backwards compatibility tests ..."
if lscpu | grep -i avx512f | grep -i avx512cd | grep -i avx512vl | grep -i avx512dq | grep -i avx512bw
then
echo "avx512 available on system"
./gradlew :qa:rolling-upgrade:testRollingUpgrade -Dtests.bwc.version=$BWC_VERSION_ROLLING_UPGRADE -Dnproc.count=`nproc`
elif lscpu | grep -i avx2
then
echo "avx2 available on system"
./gradlew :qa:rolling-upgrade:testRollingUpgrade -Dtests.bwc.version=$BWC_VERSION_ROLLING_UPGRADE -Dnproc.count=`nproc` -Davx512.enabled=false
else
echo "avx512 and avx2 not available on system"
./gradlew :qa:rolling-upgrade:testRollingUpgrade -Dtests.bwc.version=$BWC_VERSION_ROLLING_UPGRADE -Davx2.enabled=false -Davx512.enabled=false -Dsimd.enabled=false -Dnproc.count=`nproc`
fi