Skip to content

build(ci-requirements): create an environment YAML config for CI tests (Ubuntu) #449 #538

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
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
14 changes: 9 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,15 @@ jobs:
- name: Install dependencies
shell: bash -l {0}
run: |
mamba install --yes -q "python~=${PYTHON_VERSION}=*_cpython" mkl "numpy<1.26" scipy pip mkl-service graphviz cython pytest coverage pytest-cov pytest-benchmark pytest-mock sympy
pushd conda-envs/ci/unix/test 2>/dev/null
mamba install --yes -q "python~=${PYTHON_VERSION}=*_cpython" --file test.yml
# numba-scipy downgrades the installed scipy to 1.7.3 in Python 3.9, but
# not numpy, even though scipy 1.7 requires numpy<1.23. When installing
# PyTensor next, pip installs a lower version of numpy via the PyPI.
if [[ $INSTALL_NUMBA == "1" ]] && [[ $PYTHON_VERSION == "3.9" ]]; then mamba install --yes -q -c conda-forge "python~=${PYTHON_VERSION}=*_cpython" "numpy<1.23" "numba>=0.57" numba-scipy; fi
if [[ $INSTALL_NUMBA == "1" ]] && [[ $PYTHON_VERSION != "3.9" ]]; then mamba install --yes -q -c conda-forge "python~=${PYTHON_VERSION}=*_cpython" "numba>=0.57" numba-scipy; fi
if [[ $INSTALL_JAX == "1" ]]; then mamba install --yes -q -c conda-forge "python~=${PYTHON_VERSION}=*_cpython" jax jaxlib numpyro && pip install tensorflow-probability; fi
if [[ $INSTALL_NUMBA == "1" ]] && [[ $PYTHON_VERSION == "3.9" ]]; then mamba install --yes -q -c conda-forge "python~=${PYTHON_VERSION}=*_cpython" --file numba-py39.yml; fi
if [[ $INSTALL_NUMBA == "1" ]] && [[ $PYTHON_VERSION != "3.9" ]]; then mamba install --yes -q -c conda-forge "python~=${PYTHON_VERSION}=*_cpython" --file numba.yml; fi
if [[ $INSTALL_JAX == "1" ]]; then mamba install --yes -q -c conda-forge "python~=${PYTHON_VERSION}=*_cpython" --file jax.yml; fi
popd 2>/dev/null
pip install -e ./
mamba list && pip freeze
python -c 'import pytensor; print(pytensor.config.__str__(print_doc=False))'
Expand Down Expand Up @@ -198,7 +200,9 @@ jobs:
- name: Install dependencies
shell: bash -l {0}
run: |
mamba install --yes -q -c conda-forge "python~=${PYTHON_VERSION}=*_cpython" mkl numpy scipy pip mkl-service cython pytest "numba>=0.57" numba-scipy jax jaxlib pytest-benchmark
pushd conda-envs/ci/unix/benchmark 2>/dev/null
mamba install --yes -q -c conda-forge "python~=${PYTHON_VERSION}=*_cpython" --file benchmark.yml
popd 2>/dev/null
pip install -e ./
mamba list && pip freeze
python -c 'import pytensor; print(pytensor.config.__str__(print_doc=False))'
Expand Down
16 changes: 16 additions & 0 deletions conda-envs/ci/unix/benchmark/benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: unix_benchmark_environment
channels:
- conda-forge
dependencies:
- cython
- jax
- jaxlib
- mkl
- mkl-service
- "numba>=0.57"
- numba-scipy
- numpy
- pip
- pytest
- pytest-benchmark
- scipy
10 changes: 10 additions & 0 deletions conda-envs/ci/unix/test/jax.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: unix_test_environment
channels:
- conda-forge
dependencies:
- jax
- jaxlib
- numpyro
- pip
- pip:
- tensorflow-probability
7 changes: 7 additions & 0 deletions conda-envs/ci/unix/test/numba-py39.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: unix_test_environment
channels:
- conda-forge
dependencies:
- "numpy<1.23"
- "numba>=0.57"
- numba-scipy
6 changes: 6 additions & 0 deletions conda-envs/ci/unix/test/numba.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: unix_test_environment
channels:
- conda-forge
dependencies:
- "numba>=0.57"
- numba-scipy
15 changes: 15 additions & 0 deletions conda-envs/ci/unix/test/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: unix_test_environment
dependencies:
- coverage
- cython
- graphviz
- mkl
- mkl-service
- "numpy<1.26"
- pip
- pytest
- pytest-benchmark
- pytest-cov
- pytest-mock
- scipy
- sympy