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
8 changes: 3 additions & 5 deletions docs/nnx/filters_guide.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,11 @@
"\n",
"| Literal | Callable | Description |\n",
"|--------|----------------------|-------------|\n",
"| `...` | `Everything()` | Matches all values |\n",
"| `None` | `Nothing()` | Matches no values |\n",
"| `True` | `Everything()` | Matches all values |\n",
"| `False` | `Nothing()` | Matches no values |\n",
"| `...` or `True` | `Everything()` | Matches all values |\n",
"| `None` or `False` | `Nothing()` | Matches no values |\n",
"| `type` | `OfType(type)` | Matches values that are instances of `type` or have a `type` attribute that is an instance of `type` |\n",
"| | `PathContains(key)` | Matches values that have an associated `path` that contains the given `key` |\n",
"| `'{filter}'` | `WithTag('{filter}')` | Matches values that have string `tag` attribute equal to `'{filter}'`. Used by `RngKey` and `RngCount`. |\n",
"| `'{filter}'` <span style=\"color:gray\">str</span> | `WithTag('{filter}')` | Matches values that have string `tag` attribute equal to `'{filter}'`. Used by `RngKey` and `RngCount`. |\n",
"| `(*filters)` <span style=\"color:gray\">tuple</span> or `[*filters]` <span style=\"color:gray\">list</span> | `Any(*filters)` | Matches values that match any of the inner `filters` |\n",
"| | `All(*filters)` | Matches values that match all of the inner `filters` |\n",
"| | `Not(filter)` | Matches values that do not match the inner `filter` |\n",
Expand Down
8 changes: 3 additions & 5 deletions docs/nnx/filters_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,11 @@ Here is a list of all the callable Filters included in NNX and their DSL literal

| Literal | Callable | Description |
|--------|----------------------|-------------|
| `...` | `Everything()` | Matches all values |
| `None` | `Nothing()` | Matches no values |
| `True` | `Everything()` | Matches all values |
| `False` | `Nothing()` | Matches no values |
| `...` or `True` | `Everything()` | Matches all values |
| `None` or `False` | `Nothing()` | Matches no values |
| `type` | `OfType(type)` | Matches values that are instances of `type` or have a `type` attribute that is an instance of `type` |
| | `PathContains(key)` | Matches values that have an associated `path` that contains the given `key` |
| `'{filter}'` | `WithTag('{filter}')` | Matches values that have string `tag` attribute equal to `'{filter}'`. Used by `RngKey` and `RngCount`. |
| `'{filter}'` <span style="color:gray">str</span> | `WithTag('{filter}')` | Matches values that have string `tag` attribute equal to `'{filter}'`. Used by `RngKey` and `RngCount`. |
| `(*filters)` <span style="color:gray">tuple</span> or `[*filters]` <span style="color:gray">list</span> | `Any(*filters)` | Matches values that match any of the inner `filters` |
| | `All(*filters)` | Matches values that match all of the inner `filters` |
| | `Not(filter)` | Matches values that do not match the inner `filter` |
Expand Down