Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add example #2

Merged
merged 1 commit into from
Sep 29, 2023
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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ print(list(tracker))
display(tracker.to_frame())
```

See our example of [visualising transformer activations & gradients using UMAP](tests/Example.ipynb).

## License

Copyright (c) 2023 Graphcore Ltd. Licensed under the MIT License ([LICENSE](LICENSE)).
Expand Down
13 changes: 13 additions & 0 deletions dev
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,19 @@ def doc() -> None:
"tensor_tracker",
]
)
run(
[
"jupyter",
"nbconvert",
"--to",
"html",
"tests/Example.ipynb",
"--output-dir",
"doc/tensor_tracker",
"--output",
"example.html",
]
)


@cli("--skip", nargs="*", default=[], help="commands to skip")
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
-r requirements.txt
black
flake8
ipykernel
isort
jupyter
mypy
pandas
pandas-stubs
Expand Down
2 changes: 2 additions & 0 deletions tensor_tracker/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@

- Manually register/unregister hooks:
`tracker = Tracker(); tracker.register(...); tracker.unregister()`

See also: example of [visualising transformer activations & gradients using UMAP](example.html).
"""

import dataclasses
Expand Down
169 changes: 169 additions & 0 deletions tests/Example.ipynb

Large diffs are not rendered by default.

Loading