Skip to content
Merged
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
5 changes: 5 additions & 0 deletions .vscode/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
"alonso",
"arange",
"argmax",
"autodiff",
"autoregressive",
"barez",
"Beartype",
"belrose",
"bertsimas",
"biderman",
Expand All @@ -18,6 +20,7 @@
"circuitsvis",
"Codespaces",
"colab",
"collectstart",
"colour",
"conmy",
"cooney",
Expand All @@ -35,6 +38,7 @@
"evals",
"fazl",
"firstpage",
"fspath",
"furo",
"garriga",
"gelu",
Expand All @@ -49,6 +53,7 @@
"interp",
"interpretability",
"ioannis",
"ipynb",
"isort",
"janiak",
"jaxtyping",
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

napoleon_include_init_with_doc = True
napoleon_use_admonition_for_notes = True
napoleon_custom_sections = ["Motivation:"]
napoleon_custom_sections = ["Motivation:", "Warning:"]

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
Expand Down
6 changes: 5 additions & 1 deletion docs/source/content/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ You should follow this order:

A description of what the function/class does, including as much detail as is necessary to fully understand it.

Warning:

Any warnings to the user (e.g. common pitfalls).

Examples:

Include any examples here. They will be checked with doctest.
Expand Down Expand Up @@ -109,7 +113,7 @@ You can use LaTeX, but note that as you're placing this in python strings the ba
must be repeated (i.e. `\\`). You can write LaTeX inline, or in "display mode".

```reStructuredText
.. math:: (a + b)^2 = a^2 + 2ab + b^2
:math:`(a + b)^2 = a^2 + 2ab + b^2`
```

```reStructuredText
Expand Down
4 changes: 2 additions & 2 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ acceptance-test:
poetry run pytest --cov=transformer_lens/ --cov-report=term-missing --cov-branch tests/acceptance

docstring-test:
poetry run pytest transformer_lens/ --doctest-modules --doctest-plus
poetry run pytest transformer_lens/

notebook-test:
poetry run pytest demos/Exploratory_Analysis_Demo.ipynb --nbval
poetry run pytest demos/Exploratory_Analysis_Demo.ipynb

test:
make unit-test
Expand Down
6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,11 @@ filterwarnings = [
# More info: https://numpy.org/doc/stable/reference/distutils.html#module-numpy.distutils
"ignore:distutils Version classes are deprecated:DeprecationWarning"
]
addopts = "--jaxtyping-packages=transformer_lens,beartype.beartype"
addopts = """--jaxtyping-packages=transformer_lens,beartype.beartype \
-W ignore::beartype.roar.BeartypeDecorHintPep585DeprecationWarning \
--deselect transformer_lens/utils.py::test_prompt \
--doctest-modules --doctest-plus \
--nbval"""

[tool.isort]
profile = "black"
Expand Down
Loading