Skip to content

Commit 112a2f9

Browse files
Make data path work on all OS's
1 parent 53c6cbe commit 112a2f9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

examples/covasim_/doubling_beta/example_beta.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from pathlib import Path
12
import matplotlib.pyplot as plt
23
import pandas as pd
34
import numpy as np
@@ -30,8 +31,8 @@
3031
# }
3132
# rcParams.update(rc_fonts)
3233

33-
ROOT = os.path.realpath(os.path.dirname(__file__))
34-
OBSERVATIONAL_DATA_PATH = f"{ROOT}/data/10k_observational_data.csv"
34+
ROOT = Path(os.path.realpath(os.path.dirname(__file__)))
35+
OBSERVATIONAL_DATA_PATH = ROOT / "data" / "10k_observational_data.csv"
3536

3637

3738
def doubling_beta_CATE_on_csv(
@@ -262,6 +263,7 @@ def setup(observational_data_path):
262263
)
263264

264265
# 7. Create a data collector
266+
breakpoint()
265267
data_collector = ObservationalDataCollector(scenario, pd.read_csv(observational_data_path))
266268

267269
# 8. Obtain the minimal adjustment set for the base test case from the causal DAG

0 commit comments

Comments
 (0)