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

Remove unused powerset function. #3467

Closed
wants to merge 1 commit into from
Closed
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
7 changes: 3 additions & 4 deletions pymc3/model_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# of variables in a model.
RV = Tensor


class ModelGraph:
def __init__(self, model):
self.model = model
Expand All @@ -35,10 +34,10 @@ def _get_ancestors(self, var, func) -> MutableSet[RV]:
"""

# this contains all of the variables in the model EXCEPT var...
vars = set(self.var_list)
vars: MutableSet[RV] = set(self.var_list)
Copy link
Member

Choose a reason for hiding this comment

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

Via #3466 i think we're staying away from variable annotations for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ColCarroll Oh, OK. Sorry to hear that. I use them extensively, and find them quite helpful. May we use them in the comment form?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, their fine in comment form. But variable annotations are not supported by python 3.5 and we want to keep a tight integration with Arviz, which has to support python 3.5.

vars.remove(var)

blockers = set()
blockers: MutableSet[RV] = set()
retval = set()
def _expand(node) -> Optional[Iterator[Tensor]]:
if node in blockers:
Expand Down