Skip to content

Add random variable nodes#143

Merged
mscroggs merged 33 commits into
mainfrom
mscroggs/rvnodes2
Jun 26, 2026
Merged

Add random variable nodes#143
mscroggs merged 33 commits into
mainfrom
mscroggs/rvnodes2

Conversation

@mscroggs

@mscroggs mscroggs commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Added nodes that represent random variables. These nodes then can be evaluated if the values of all of their parents are known/input.

This PR includes adding an assertion that labels are valid Python variable names, so that **kwargs interfaces can be used to set the values of nodes.

Resolves #124.

@mscroggs mscroggs marked this pull request as draft June 25, 2026 13:19
@mscroggs mscroggs mentioned this pull request Jun 26, 2026
@mscroggs mscroggs marked this pull request as ready for review June 26, 2026 09:25

@willGraham01 willGraham01 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Largely OK but a few comments on some naming conventions, and flagging that the signature of compute might not be able to be taken for granted. But for now we can ignore this until we have something concrete for #139, and then look at getting the two of them to play nicely.

Comment thread src/causalprog/graph/node/random_variables.py
Comment thread src/causalprog/graph/node/random_variables.py Outdated
Comment thread src/causalprog/graph/node/random_variables.py Outdated
Comment thread src/causalprog/graph/node/random_variables.py
Comment thread src/causalprog/graph/node/random_variables.py
Comment thread tests/test_node/test_random_variables.py Outdated
mscroggs and others added 3 commits June 26, 2026 14:01
Co-authored-by: Will Graham <32364977+willGraham01@users.noreply.github.com>
@mscroggs mscroggs requested a review from willGraham01 June 26, 2026 13:13
@mscroggs mscroggs merged commit 6c75bde into main Jun 26, 2026
5 checks passed
@mscroggs mscroggs deleted the mscroggs/rvnodes2 branch June 26, 2026 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RVNodes

2 participants