Skip to content
New issue

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

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

Already on GitHub? # to your account

allow for empty witness in SearchForCause #491

Merged
merged 3 commits into from
Jan 10, 2024
Merged

Conversation

rfl-urbaniak
Copy link
Collaborator

allows witnesses = {} and adds a clause to the test of SearchForCause.

Copy link
Contributor

@eb8680 eb8680 left a comment

Choose a reason for hiding this comment

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

Can you add the same fix for antecedents and consequents? There are checks below this logic that antecedents and consquents are nonempty but the same bug will prevent them from being reached.

@rfl-urbaniak
Copy link
Collaborator Author

will do

@rfl-urbaniak
Copy link
Collaborator Author

by the way, the difference is though the user might intend the witness set to be empty (this is the but-for clause check), but if they're not specifying the antecedent or consequent, this should perhaps raise a value error. Something to think about in the future. For now I'll just do the same thing.

@eb8680 eb8680 added bug Something isn't working module:explainable labels Jan 10, 2024
@eb8680 eb8680 merged commit ad4bc9c into staging-causality Jan 10, 2024
6 checks passed
@eb8680 eb8680 deleted the ru-empty-witness branch January 10, 2024 20:11
rfl-urbaniak added a commit that referenced this pull request Jan 12, 2024
* removed explanation code (#411)

* add `preempt` and its tests (#414)

* added preempt and its tests

* refactored test to use new code

* lint

* added uniform proposal (#416)

* add consequent_differs and a test thereof (#418)

* added preempt and its tests

* refactored test to use new code

* lint

* added consequent_differs and a test thereof

---------

Co-authored-by: eb8680 <eb8680@users.noreply.github.com>

* add Preemptions and a test thereof (#420)

* added preempt and its tests

* refactored test to use new code

* lint

* added Preemptions and a test thereof

* added `undo_split` and a test thereof (#422)

* import

---------

Co-authored-by: Eli <eli@elibingham.com>

* added SplitSubsets and a test thereof (#424)

* added preempt and its tests

* refactored test to use new code

* lint

* added Preemptions and a test thereof

* added `undo_split` and a test thereof

* added SplitSubsets and a test thereof

* added `undo_split` and a test thereof (#422)

* import

---------

Co-authored-by: Eli <eli@elibingham.com>
Co-authored-by: eb8680 <eb8680@users.noreply.github.com>

* added `random intervention` and a test thereof (#442)

* add `SearchForExplanation` (#445)

* added `random intervention` and a test thereof

* added `SearchForExplanation` and a test thereof

---------

Co-authored-by: eb8680 <eb8680@users.noreply.github.com>

* explainable documentation update (#457)

* docstrings update WIP

* small typo

* Remove explainable references from chirho.counterfactual (#458)

* implement `soft_eq` and `soft_neq`  (#472)

* add soft_neq and a few tests in test_ops

* sof eq WIP

* conversion to soft_eq

* defaulting soft_eq scale to .1

* Tavares conditions have landed

* soft_neq with tests

* added docstring for soft_neq

* refactor soft_eq and soft_neq

* tests

* remove failing tests

* comment

* sign

* move soft_neq to internals for now

* nit

* remove comment

---------

Co-authored-by: Eli <eli@elibingham.com>

* Add explainable module to Sphinx build (#481)

* Add explainable module to sphinx build

* Add explainable module to sphinx build

* Reorganize code in chirho.explainable (#485)

* Add explainable module to sphinx build

* Add explainable module to sphinx build

* reorganize codebase

* remove empty file

* rename alternatives

* reorganize test files

* sphinx

* remove test_defaults

* implement soft_neq and use downstream in the explainable module (#490)

* that's it

* lint

* lint

* preemptions type as required by runner lint

* persistent lint typing error, using Any

* reverting to Preemptions

* add revised actual causality notebook (#446)

* added `random intervention` and a test thereof

* added `SearchForExplanation` and a test thereof

* added ac notebook with a test

* small cleanup

* that's it

* rerun actual causality and added it to rst

* actual causality nb WIP

* lint

* proofreading

* lint

* preemptions type as required by runner lint

* persistent lint typing error, using Any

* reverting to Preemptions

* lint, add actual_causality to notebook tests again

* removed redundant alternatives.py

* remove redundant split_subset.py

* fixing docstrings

* format & lint

* pulled explanation from ru-propagate-...

* docstrings in explanation.py

* typo in ac nb

---------

Co-authored-by: eb8680 <eb8680@users.noreply.github.com>

* allow for empty witness in SearchForCause (#491)

* allow for empty witness in SearchForCause

* removed mwc_empty from a test

* allow empty ant and con

* Implement `InferConstraints` (#493)

* experiment done

* cleanup, docstring

* eliminate args from ExtractSupport, move to components

* lint

---------

Co-authored-by: eb8680 <eb8680@users.noreply.github.com>
Co-authored-by: Eli <eli@elibingham.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working module:explainable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants