You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-7Lines changed: 4 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,14 +12,11 @@ You can modify the list of AD types in `main.jl`.
12
12
13
13
## I want to add more models!
14
14
15
-
You can modify the list of models in `models.jl`.
15
+
You can modify the list of models by adding a new file inside the `models` directory.
16
+
This file should contain the model definition, and call the `@register` macro to register the model with the `ADTests` package.
17
+
See the existing files in that directory for examples.
16
18
17
-
Note that if you want the model definition to be shown on the website, your model definitions must be of the 'standard' form `@model function name() ... end`.
18
-
This means that:
19
-
- One-liner function definitions like `@model f(x) = ...`will not work.
20
-
- Fancy metaprogramming tricks to generate a family of models at one go (like [this old code](https://github.com/TuringLang/ADTests/blob/266d7ab85fea2e01e7e05af6cee179d7f6200b0f/models.jl#L108-L129)) will not work.
21
-
22
-
To understand why, see the `get_model_definition` function in `ad.py`.
19
+
To make sure that the definition is included in the final website, you will have to make sure that the filename is the same as the model name (i.e. a model `@model function f()` is in `models/f.jl`).
0 commit comments