Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit 00cddd5

Browse files
authored
Bump up version; Fixes for docs (#102)
* Bump up version; Fixes for docs * Fix accidental changes to pyproject.toml * Fix docs
1 parent 36248c9 commit 00cddd5

File tree

4 files changed

+13
-11
lines changed

4 files changed

+13
-11
lines changed

pgmax/bp/infer.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ def pass_var_to_fac_messages(
2525
Args:
2626
ftov_msgs: Array of shape (num_edge_state,). This holds all the flattened factor to variable
2727
messages.
28-
Array of shape (num_var_states,) representing the flattened evidence for each variable
28+
evidence: Array of shape (num_var_states,) representing the flattened evidence for each variable
29+
var_states_for_edges: Array of shape (num_edge_states,)
30+
Global variable state indices for each edge state
2931
Returns:
3032
Array of shape (num_edge_state,). This holds all the flattened variable to factor messages.
3133
"""

pgmax/fg/graph.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -542,8 +542,7 @@ class FToVMessages:
542542
fg_state: Factor graph state
543543
value: Optionally specify initial value for ftov messages
544544
545-
Raises: ValueError if provided value does not match expected ftov messages
546-
shape.
545+
Raises: ValueError if provided value does not match expected ftov messages shape.
547546
"""
548547

549548
fg_state: FactorGraphState
@@ -790,13 +789,12 @@ def BP(bp_state: BPState, num_iters: int) -> Tuple[Callable, Callable, Callable]
790789
num_iters: Number of belief propagation iterations.
791790
792791
Returns:
793-
tuple containing
794-
795-
run_bp: Function for running belief propagation for num_iters.
796-
Optionally takes as input log_potentials updates, ftov_msgs updates,
797-
evidence updates, and damping factor, and outputs a BPArrays.
798-
get_bp_state: Function to reconstruct the BPState from BPArrays.
799-
get_beliefs: Function to calculate beliefs from BPArrays.
792+
Tuple containing\n
793+
\trun_bp: Function for running belief propagation for num_iters.\n
794+
\t\tOptionally takes as input log_potentials updates, ftov_msgs updates,
795+
\t\tevidence updates, and damping factor, and outputs a BPArrays.\n
796+
\tget_bp_state: Function to reconstruct the BPState from BPArrays.\n
797+
\tget_beliefs: Function to calculate beliefs from BPArrays.\n
800798
"""
801799
max_msg_size = int(np.max(bp_state.fg_state.wiring.edges_num_states))
802800
num_val_configs = (

pgmax/fg/groups.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"""A module containing the classes for variable and factor groups in a Factor Graph."""
2+
13
import collections
24
import itertools
35
import typing

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "pgmax"
3-
version = "0.2.0"
3+
version = "0.2.1"
44
description = "Loopy belief propagation for factor graphs on discrete variables, in JAX!"
55
authors = ["Stannis Zhou <[email protected]>", "Nishanth Kumar <[email protected]>", "Miguel Lazaro-Gredilla <[email protected]>", "Dileep George <[email protected]>"]
66
maintainers = ["Stannis Zhou <[email protected]>", "Nishanth Kumar <[email protected]>"]

0 commit comments

Comments
 (0)