stanfordnlp / pyvene

Stanford NLP Python Library for Understanding and Improving PyTorch Models via Interventions
http://pyvene.ai
Apache License 2.0
545 stars 46 forks source link

[Minor] Revert CausalModel to accept input/output functions when generating factual/counterfactual datasets #137

Closed amirzur2023 closed 3 months ago

amirzur2023 commented 3 months ago

Description

Small change that re-introduces input & output functions for pre-processing data when generating datasets from the causal model. Only the causal_model.py file was edited.

Testing Done

Ran test cases for causal model (see screenshot below). Other tests aren't necessary because they aren't affected by causal_model.py. Tutorials using causal model run as expected since the update doesn't change the code's old behavior.

image