Skip to content

Commit b00d95d

Browse files
committed
Updated readme
1 parent f0cb2f4 commit b00d95d

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

README.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ For more information on how to use the Causal Testing Framework, please refer to
6666
2. If you do not already have causal test cases, you can convert your causal DAG to causal tests by running the following command.
6767

6868
```
69-
python causal_testing/testing/metamorphic_relation.py --dag_path $PATH_TO_DAG --output_path $PATH_TO_TESTS
69+
python -m causal_testing -G --dag_path $PATH_TO_DAG --output_path $PATH_TO_TESTS
7070
```
7171

7272
3. You can now execute your tests by running the following command.
@@ -76,6 +76,32 @@ python -m causal_testing --dag_path $PATH_TO_DAG --data_paths $PATH_TO_DATA --te
7676
The results will be saved for inspection in a JSON file located at `$OUTPUT`.
7777
In the future, we hope to add a visualisation tool to assist with this.
7878

79+
## Docker Image
80+
Rather than installing the package and its dependencies locally, we also provide a docker image.
81+
To run this, the only pre-requisite is [Docker](https://www.docker.com/).
82+
To build the image, run
83+
```
84+
docker build --tag causal_testing # or some other tag if you prefer
85+
```
86+
87+
After this, you can simply follow the usage instructions above, replacing `python -m causal_testing` with `docker run causal_testing`.
88+
You will also need to provide docker access to the input files.
89+
If you have the following directory structure
90+
```
91+
example
92+
├── causal_tests.json
93+
├── dag.dot
94+
├── data.csv
95+
```
96+
you would use the following docker command.
97+
```
98+
docker run -v full/path/to/example:/example -it causal_testing -D /example/dag.dot -o /example/log.json -d /example/data/random/data_random_1000.csv -t /example/causal_tests.json
99+
```
100+
A file called `log.json` would then appear in the `example` directory along with your causal tests, DAG, and data.
101+
102+
>[!NOTE]
103+
> Docker only deals with absolute paths, so you need to provide the full absolute path to the `example` directory, e.g. `/home/user/Documents/example` in linux, or `C:\Users\user\example` in Windows.
104+
79105
## How to Cite
80106
If you use our framework in your work, please cite the following:
81107

0 commit comments

Comments
 (0)