Skip to content

Commit

Permalink
Remove label distribution printing (can be done post-hoc)
Browse files Browse the repository at this point in the history
  • Loading branch information
justin13601 committed Oct 26, 2024
1 parent 495f2c0 commit ec07a94
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/aces/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
"""


from collections import Counter

import polars as pl
from bigtree import preorder_iter
from loguru import logger
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit ec07a94

Please sign in to comment.