File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
causal_testing/json_front Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ # JSON Causal Testing Framework Frontend
2
+
3
+ The JSON frontend allows Causal Tests and parameters to be specified in JSON to allow for tests to be quickly written
4
+ whilst retaining the flexibility of the Causal Testing Framework (CTF).
5
+
6
+ An example is provided in ` examples/poisson ` which will be walked through in this README to better understand
7
+ the framework
8
+
9
+ ` examples/poisson/causal_test_setup.py ` contains python code written by the user to implement scenario specific features
10
+ such as:
11
+ 1 . Custom Estimators
12
+ 2 . Causal Variable specification
13
+ 3 . Causal test case outcomes
14
+ 4 . Meta constraint functions
15
+ 5 . Mapping JSON distributions, effects, and estimators to python objects
16
+
17
+ ` examples/poisson/causal_tests.json ` is the JSON file that allows for the easy specification of multiple causal tests.
18
+ Each test requires:
19
+ 1 . Test name
20
+ 2 . Mutations
21
+ 3 . Estimator
22
+ 4 . Estimate_type
23
+ 5 . Effect modifiers
24
+ 6 . Expected effects
25
+ 7 . Skip: boolean that if set true the test won't be executed and will be skipped
26
+
27
+ To run the JSON frontend example from the root directory of the project, use
28
+ ` python examples\poisson\causal_test_setup.py --directory_path="examples/poisson" `
29
+
30
+ A failure flag ` -f ` can be specified to stop the framework running if a test is failed
31
+ ` python examples\poisson\causal_test_setup.py -f --directory_path="examples/poisson" `
32
+
You can’t perform that action at this time.
0 commit comments