From ec07a944919dd266fc040bd98da6fb4aaf7d26d3 Mon Sep 17 00:00:00 2001 From: Justin Xu Date: Sat, 26 Oct 2024 15:20:42 +0100 Subject: [PATCH] Remove label distribution printing (can be done post-hoc) --- src/aces/query.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/aces/query.py b/src/aces/query.py index 9903a21..b5a99e8 100644 --- a/src/aces/query.py +++ b/src/aces/query.py @@ -4,8 +4,6 @@ """ -from collections import Counter - import polars as pl from bigtree import preorder_iter from loguru import logger @@ -145,16 +143,6 @@ def query(cfg: TaskExtractorConfig, predicates_df: pl.DataFrame) -> pl.DataFrame "This may indicate an issue with the task logic. " "Please double-check your configuration file if this is not expected." ) - else: - unique_labels = result["label"].n_unique() - label_distribution = Counter(result["label"]) - total_count = sum(label_distribution.values()) - distribution_with_pct = { - k: f"{v} ({v/total_count*100:.1f}%)" for k, v in label_distribution.items() - } - logger.info( - f"Found {unique_labels} unique labels in the extracted cohort: " f"{distribution_with_pct}." - ) # add index_timestamp column if specified if cfg.index_timestamp_window: