From 53a0e98227551f15207565ba2c6bc8f8208c03af Mon Sep 17 00:00:00 2001 From: RunasSudo Date: Fri, 21 Apr 2023 18:10:40 +1000 Subject: [PATCH] Pass through interval-censored Cox fitting progress to stderr --- yli/regress.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yli/regress.py b/yli/regress.py index cd17a89..a84f673 100644 --- a/yli/regress.py +++ b/yli/regress.py @@ -697,9 +697,12 @@ class IntervalCensoredCox(RegressionModel): csv_str = csv_buf.getvalue() # Run intcens binary - proc = subprocess.run([config.hpstat_path, 'intcox', '-', '--output', 'json'], input=csv_str, capture_output=True, encoding='utf-8', check=True) + proc = subprocess.run([config.hpstat_path, 'intcox', '-', '--output', 'json'], input=csv_str, stdout=subprocess.PIPE, stderr=None, encoding='utf-8', check=True) raw_result = json.loads(proc.stdout) + from IPython.display import clear_output + clear_output(wait=True) + z_critical = -stats.norm.ppf(config.alpha / 2) result.terms = {raw_name: SingleTerm( raw_name=raw_name,