Skip to content

Commit f9e79b7

Browse files
authored
Merge branch 'main' into torch_dot
2 parents 0ec1221 + 68d9b80 commit f9e79b7

File tree

141 files changed

+3816
-2660
lines changed

Some content is hidden

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

141 files changed

+3816
-2660
lines changed

.github/workflows/pypi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
fetch-depth: 0
5050

5151
- name: Build wheels
52-
uses: pypa/[email protected].1
52+
uses: pypa/[email protected].2
5353

5454
- uses: actions/upload-artifact@v3
5555
with:

.github/workflows/test.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +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"
8182
- "tests --ignore=tests/tensor --ignore=tests/scan --ignore=tests/sparse"
8283
- "tests/scan"
8384
- "tests/sparse"
@@ -96,6 +97,10 @@ jobs:
9697
part: "tests/tensor/test_math.py"
9798
- fast-compile: 1
9899
float32: 1
100+
- part: "--doctest-modules --ignore=pytensor/misc/check_duplicate_key.py pytensor --ignore=pytensor/link"
101+
float32: 1
102+
- part: "--doctest-modules --ignore=pytensor/misc/check_duplicate_key.py pytensor --ignore=pytensor/link"
103+
fast-compile: 1
99104
include:
100105
- install-numba: 1
101106
python-version: "3.10"
@@ -149,11 +154,12 @@ jobs:
149154
shell: micromamba-shell {0}
150155
run: |
151156
152-
micromamba install --yes -q "python~=${PYTHON_VERSION}=*_cpython" mkl numpy scipy pip mkl-service graphviz cython pytest coverage pytest-cov pytest-benchmark pytest-mock sympy
157+
micromamba install --yes -q "python~=${PYTHON_VERSION}=*_cpython" mkl numpy scipy pip mkl-service graphviz cython pytest coverage pytest-cov pytest-benchmark pytest-mock
153158
if [[ $INSTALL_NUMBA == "1" ]]; then micromamba install --yes -q -c conda-forge "python~=${PYTHON_VERSION}=*_cpython" "numba>=0.57"; fi
154159
if [[ $INSTALL_JAX == "1" ]]; then micromamba install --yes -q -c conda-forge "python~=${PYTHON_VERSION}=*_cpython" jax jaxlib numpyro && pip install tensorflow-probability; fi
155160
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
156-
161+
pip install pytest-sphinx
162+
157163
pip install -e ./
158164
micromamba list && pip freeze
159165
python -c 'import pytensor; print(pytensor.config.__str__(print_doc=False))'

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ repos:
2222
)$
2323
- id: check-merge-conflict
2424
- repo: https://github.com/astral-sh/ruff-pre-commit
25-
rev: v0.4.10
25+
rev: v0.5.1
2626
hooks:
2727
- id: ruff
2828
args: ["--fix", "--output-format=full"]

doc/conf.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@
1212
# serve to show the default value.
1313

1414
# If your extensions are in another directory, add it here. If the directory
15-
# is relative to the documentation root, use os.path.abspath to make it
15+
# is relative to the documentation root, use Path.absolute to make it
1616
# absolute, like shown here.
17-
# sys.path.append(os.path.abspath('some/directory'))
17+
# sys.path.append(str(Path("some/directory").absolute()))
1818

1919
import os
20+
import inspect
2021
import sys
2122
import pytensor
2223

@@ -32,8 +33,16 @@
3233
"sphinx.ext.napoleon",
3334
"sphinx.ext.linkcode",
3435
"sphinx.ext.mathjax",
36+
"sphinx_design",
37+
"sphinx.ext.intersphinx"
3538
]
3639

40+
intersphinx_mapping = {
41+
"jax": ("https://jax.readthedocs.io/en/latest", None),
42+
"numpy": ("https://numpy.org/doc/stable", None),
43+
"torch": ("https://pytorch.org/docs/stable", None),
44+
}
45+
3746
needs_sphinx = "3"
3847

3948
todo_include_todos = True
@@ -228,11 +237,9 @@ def find_source():
228237
obj = sys.modules[info["module"]]
229238
for part in info["fullname"].split("."):
230239
obj = getattr(obj, part)
231-
import inspect
232-
import os
233240

234-
fn = inspect.getsourcefile(obj)
235-
fn = os.path.relpath(fn, start=os.path.dirname(pytensor.__file__))
241+
fn = Path(inspect.getsourcefile(obj))
242+
fn = fn.relative_to(Path(__file__).parent)
236243
source, lineno = inspect.getsourcelines(obj)
237244
return fn, lineno, lineno + len(source) - 1
238245

doc/environment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ dependencies:
1313
- mock
1414
- pillow
1515
- pymc-sphinx-theme
16+
- sphinx-design
1617
- pip
1718
- pip:
1819
- -e ..

0 commit comments

Comments
 (0)