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

Counterfactual interventions on product types should only split() once #379

Open
eb8680 opened this issue Nov 14, 2023 · 2 comments
Open
Assignees
Labels
bug Something isn't working module:counterfactual

Comments

@eb8680
Copy link
Contributor

eb8680 commented Nov 14, 2023

Currently, applying split to a container object like a tuple or dict within a MultiWorldCounterfactual context may result in a new split for each element of the container. The correct behavior in this case would instead be to split once and share the new index variable across all elements of the container.

@eb8680
Copy link
Contributor Author

eb8680 commented Feb 29, 2024

I think this will be resolved by #528

@eb8680
Copy link
Contributor Author

eb8680 commented Apr 26, 2024

@SamWitty I'm reassigning this to you since I think it corresponds to your comment on #528:

I'd like to add a tiny PR that adds an optional name kwarg to the existing dynamical systems interventions, which should change the counterfactual behavior from "one world per state variable" to "one world per static/dynamic intervention". That will also hopefully make it much easier to index into worlds produced from dynamical systems interventions. I know this PR is already intended to lead to interventions on dynamics, but figured it would be worth mentioning how it will improve the ergonomics (with a minor change) of the existing dynamical systems interventions. Thoughts?

I think this issue was resolved by #528 but you might want to try writing unit tests for the counterfactual and dynamical modules to verify that the new behavior is what you want.

@eb8680 eb8680 assigned SamWitty and unassigned eb8680 Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working module:counterfactual
Projects
None yet
Development

No branches or pull requests

2 participants