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

Dependency tracking tutorial #3197

Merged
merged 3 commits into from
Apr 20, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
concenpt -> concept; equals to -> equals
  • Loading branch information
ordabayevy committed Apr 17, 2023
commit 6df67fd7da24135b9b7a038fcd52b6142a45261b
4 changes: 2 additions & 2 deletions tutorial/source/svi_part_iii.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
"source": [
"### Aside: Dependency tracking in Pyro\n",
"\n",
"Finally, a word about dependency tracking. Pyro uses the concenpt of provenance for tracking dependency within a stochastic function that includes arbitrary Python code (see reference [5]). In the programming language theory, the provenance of a variable refers to the history of variables or computations that contributed to its value. The simple example below demonstrates how provenance is tracked through PyTorch ops in Pyro, where provenance is a user-defined frozenset of objects:\n",
"Finally, a word about dependency tracking. Pyro uses the concept of provenance for tracking dependency within a stochastic function that includes arbitrary Python code (see reference [5]). In the programming language theory, the provenance of a variable refers to the history of variables or computations that contributed to its value. The simple example below demonstrates how provenance is tracked through PyTorch ops in Pyro, where provenance is a user-defined frozenset of objects:\n",
"\n",
"```python\n",
"from pyro.ops.provenance import get_provenance, track_provenance\n",
Expand All @@ -158,7 +158,7 @@
"c = torch.randn(3) # no provenance information\n",
"\n",
"# For a unary operation, the provenance of the output tensor\n",
"# equals to the provenace of the input tensor\n",
"# equals the provenace of the input tensor\n",
"assert get_provenance(a.exp()) == frozenset({\"a\"})\n",
"# In general, the provenance of the output tensors of any op\n",
"# is the union of provenances of input tensors.\n",
Expand Down