Skip to content

Commit

Permalink
MNT Speed up OSX builds with 3 cores on Azure (scikit-learn#21772)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasjpfan committed Nov 24, 2021
1 parent f57a5f9 commit b609562
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -247,11 +247,13 @@ jobs:
DISTRIB: 'conda'
BLAS: 'mkl'
CONDA_CHANNEL: 'conda-forge'
CPU_COUNT: '3'
pylatest_conda_mkl_no_openmp:
DISTRIB: 'conda'
BLAS: 'mkl'
SKLEARN_TEST_NO_OPENMP: 'true'
SKLEARN_SKIP_OPENMP_TEST: 'true'
CPU_COUNT: '3'

- template: build_tools/azure/windows.yml
parameters:
Expand Down
2 changes: 2 additions & 0 deletions build_tools/azure/posix-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
JUNITXML: 'test-data.xml'
OMP_NUM_THREADS: '2'
OPENBLAS_NUM_THREADS: '2'
CPU_COUNT: '2'
SKLEARN_SKIP_NETWORK_TESTS: '1'
NUMPY_VERSION: 'latest'
SCIPY_VERSION: 'latest'
Expand Down Expand Up @@ -69,6 +70,7 @@ jobs:
-e OPENBLAS_NUM_THREADS=$OPENBLAS_NUM_THREADS
-e SKLEARN_SKIP_NETWORK_TESTS=$SKLEARN_SKIP_NETWORK_TESTS
-e BLAS=$BLAS
-e CPU_COUNT=$CPU_COUNT
$DOCKER_CONTAINER
sleep 1000000
displayName: 'Start container'
Expand Down
2 changes: 2 additions & 0 deletions build_tools/azure/posix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jobs:
- job: ${{ parameters.name }}
dependsOn: ${{ parameters.dependsOn }}
condition: ${{ parameters.condition }}
timeoutInMinutes: 120
pool:
vmImage: ${{ parameters.vmImage }}
variables:
Expand All @@ -17,6 +18,7 @@ jobs:
JUNITXML: 'test-data.xml'
OMP_NUM_THREADS: '2'
OPENBLAS_NUM_THREADS: '2'
CPU_COUNT: '2'
SKLEARN_SKIP_NETWORK_TESTS: '1'
CCACHE_DIR: $(Pipeline.Workspace)/ccache
CCACHE_COMPRESS: '1'
Expand Down
2 changes: 1 addition & 1 deletion build_tools/azure/test_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ if [[ -n "$CHECK_WARNINGS" ]]; then
fi

if [[ "$PYTEST_XDIST_VERSION" != "none" ]]; then
TEST_CMD="$TEST_CMD -n2"
TEST_CMD="$TEST_CMD -n$CPU_COUNT"
fi

if [[ "$SHOW_SHORT_SUMMARY" == "true" ]]; then
Expand Down
1 change: 1 addition & 0 deletions build_tools/azure/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
PYTEST_XDIST_VERSION: 'latest'
TEST_DIR: '$(Agent.WorkFolder)/tmp_folder'
SHOW_SHORT_SUMMARY: 'false'
CPU_COUNT: '2'
strategy:
matrix:
${{ insert }}: ${{ parameters.matrix }}
Expand Down

0 comments on commit b609562

Please sign in to comment.