Skip to content

Commit b28bdf6

Browse files
authored
Merge branch 'main' into scalarloop
2 parents c894b08 + a377c22 commit b28bdf6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+2121
-1359
lines changed

.github/workflows/mypy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- uses: actions/checkout@v4
1616
- uses: mamba-org/setup-micromamba@v1
1717
with:
18-
micromamba-version: "latest" # any version from https://github.com/mamba-org/micromamba-releases
18+
micromamba-version: "1.5.10-0" # until https://github.com/mamba-org/setup-micromamba/issues/225 is resolved
1919
environment-file: environment.yml
2020
init-shell: bash
2121
cache-environment: true

.github/workflows/pypi.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,18 @@ jobs:
3535
name: sdist
3636
path: dist/*.tar.gz
3737

38+
run_checks:
39+
name: Build & inspect our package.
40+
# Note: the resulting builds are not actually published.
41+
# This is purely for additional testing and diagnostic purposes.
42+
runs-on: ubuntu-latest
43+
44+
steps:
45+
- uses: actions/checkout@v4
46+
with:
47+
fetch-depth: 0
48+
- uses: hynek/build-and-inspect-python-package@v2
49+
3850
build_wheels:
3951
name: Build wheels for ${{ matrix.platform }}
4052
runs-on: ${{ matrix.platform }}
@@ -50,7 +62,7 @@ jobs:
5062
fetch-depth: 0
5163

5264
- name: Build wheels
53-
uses: pypa/[email protected].0
65+
uses: pypa/[email protected].2
5466

5567
- uses: actions/upload-artifact@v4
5668
with:
@@ -133,7 +145,7 @@ jobs:
133145
name: universal_wheel
134146
path: dist
135147

136-
- uses: pypa/gh-action-pypi-publish@v1.9.0
148+
- uses: pypa/gh-action-pypi-publish@v1.10.3
137149
with:
138150
user: __token__
139151
password: ${{ secrets.pypi_password }}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Read the Docs Pull Request Preview
2+
on:
3+
pull_request_target:
4+
types:
5+
- opened
6+
7+
permissions:
8+
pull-requests: write
9+
10+
jobs:
11+
documentation-links:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: readthedocs/actions/preview@v1
15+
with:
16+
project-slug: "pytensor"

.github/workflows/test.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
install-jax: [0]
7979
install-torch: [0]
8080
part:
81-
- "--doctest-modules --ignore=pytensor/misc/check_duplicate_key.py pytensor --ignore=pytensor/link"
81+
- "--doctest-modules pytensor --ignore=pytensor/misc/check_duplicate_key.py --ignore=pytensor/link"
8282
- "tests --ignore=tests/tensor --ignore=tests/scan --ignore=tests/sparse"
8383
- "tests/scan"
8484
- "tests/sparse"
@@ -97,9 +97,9 @@ jobs:
9797
part: "tests/tensor/test_math.py"
9898
- fast-compile: 1
9999
float32: 1
100-
- part: "--doctest-modules --ignore=pytensor/misc/check_duplicate_key.py pytensor --ignore=pytensor/link"
100+
- part: "--doctest-modules pytensor --ignore=pytensor/misc/check_duplicate_key.py --ignore=pytensor/link"
101101
float32: 1
102-
- part: "--doctest-modules --ignore=pytensor/misc/check_duplicate_key.py pytensor --ignore=pytensor/link"
102+
- part: "--doctest-modules pytensor --ignore=pytensor/misc/check_duplicate_key.py --ignore=pytensor/link"
103103
fast-compile: 1
104104
include:
105105
- install-numba: 1
@@ -135,7 +135,7 @@ jobs:
135135
uses: mamba-org/setup-micromamba@v1
136136
with:
137137
environment-name: pytensor-test
138-
micromamba-version: "latest"
138+
micromamba-version: "1.5.10-0" # until https://github.com/mamba-org/setup-micromamba/issues/225 is resolved
139139
init-shell: bash
140140
post-cleanup: "all"
141141
create-args: python=${{ matrix.python-version }}
@@ -157,7 +157,7 @@ jobs:
157157
micromamba install --yes -q "python~=${PYTHON_VERSION}=*_cpython" mkl numpy scipy pip mkl-service graphviz cython pytest coverage pytest-cov pytest-benchmark pytest-mock
158158
if [[ $INSTALL_NUMBA == "1" ]]; then micromamba install --yes -q -c conda-forge "python~=${PYTHON_VERSION}=*_cpython" "numba>=0.57"; fi
159159
if [[ $INSTALL_JAX == "1" ]]; then micromamba install --yes -q -c conda-forge "python~=${PYTHON_VERSION}=*_cpython" jax jaxlib numpyro && pip install tensorflow-probability; fi
160-
if [[ $INSTALL_TORCH == "1" ]]; then micromamba install --yes -q -c conda-forge "python~=${PYTHON_VERSION}=*_cpython" pytorch pytorch-cuda=12.1 -c pytorch -c nvidia; fi
160+
if [[ $INSTALL_TORCH == "1" ]]; then micromamba install --yes -q -c conda-forge "python~=${PYTHON_VERSION}=*_cpython" pytorch pytorch-cuda=12.1 "mkl<=2024.0" -c pytorch -c nvidia; fi
161161
pip install pytest-sphinx
162162
163163
pip install -e ./
@@ -209,13 +209,13 @@ jobs:
209209
uses: mamba-org/setup-micromamba@v1
210210
with:
211211
environment-name: pytensor-test
212-
micromamba-version: "latest"
212+
micromamba-version: "1.5.10-0" # until https://github.com/mamba-org/setup-micromamba/issues/225 is resolved
213213
init-shell: bash
214214
post-cleanup: "all"
215215
- name: Install dependencies
216216
shell: micromamba-shell {0}
217217
run: |
218-
micromamba install --yes -q -c conda-forge "python~=${PYTHON_VERSION}=*_cpython" mkl numpy scipy pip mkl-service cython pytest "numba>=0.57" jax jaxlib pytest-benchmark pytorch pytorch-cuda=12.1 -c pytorch -c nvidia
218+
micromamba install --yes -q -c conda-forge "python~=${PYTHON_VERSION}=*_cpython" mkl numpy scipy pip mkl-service cython pytest "numba>=0.57" jax jaxlib pytest-benchmark
219219
pip install -e ./
220220
micromamba list && pip freeze
221221
python -c 'import pytensor; print(pytensor.config.__str__(print_doc=False))'

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ exclude: |
99
)$
1010
repos:
1111
- repo: https://github.com/pre-commit/pre-commit-hooks
12-
rev: v4.6.0
12+
rev: v5.0.0
1313
hooks:
1414
- id: debug-statements
1515
exclude: |
@@ -27,7 +27,7 @@ repos:
2727
- id: sphinx-lint
2828
args: ["."]
2929
- repo: https://github.com/astral-sh/ruff-pre-commit
30-
rev: v0.6.5
30+
rev: v0.6.9
3131
hooks:
3232
- id: ruff
3333
args: ["--fix", "--output-format=full"]

doc/library/graph/graph.rst

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,5 @@
44
:mod:`graph` -- Interface for the PyTensor graph
55
================================================
66

7-
---------
8-
Reference
9-
---------
10-
117
.. automodule:: pytensor.graph.basic
12-
:platform: Unix, Windows
13-
:synopsis: Interface for types of symbolic variables
148
:members:
15-
.. moduleauthor:: LISA

doc/library/graph/index.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11

22
.. _libdoc_graph:
33

4-
================================================
5-
:mod:`graph` -- Theano Internals [doc TODO]
6-
================================================
4+
========================================
5+
:mod:`graph` -- PyTensor Graph Internals
6+
========================================
77

88
.. module:: graph
9-
:platform: Unix, Windows
10-
:synopsis: Theano Internals
9+
1110
.. moduleauthor:: LISA
1211

1312
.. toctree::
1413
:maxdepth: 1
1514

1615
graph
1716
fgraph
17+
replace
1818
features
1919
op
2020
type

doc/library/graph/op.rst

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
21
.. _libdoc_graph_op:
32

4-
==============================================================
5-
:mod:`graph` -- Objects and functions for computational graphs
6-
==============================================================
3+
===========================================
4+
:mod:`op` -- Objects that define operations
5+
===========================================
76

87
.. automodule:: pytensor.graph.op
9-
:platform: Unix, Windows
10-
:synopsis: Interface for types of symbolic variables
118
:members:
12-
.. moduleauthor:: LISA

doc/library/graph/replace.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.. _libdoc_graph_replace:
2+
3+
==================================================
4+
:mod:`replace` -- High level graph transformations
5+
==================================================
6+
7+
.. automodule:: pytensor.graph.replace
8+
:members:

doc/library/tensor/functional.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.. automodule:: pytensor.tensor.functional
2+
:members: vectorize

0 commit comments

Comments
 (0)