Skip to content

Commit

Permalink
added logging information for MEDS_reader dataset related arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaoPang committed Oct 11, 2024
1 parent 3375240 commit fe9e956
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/cehrbert/data_generators/hf_data_generator/meds_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import numpy as np
import pandas as pd
from datasets import Dataset, DatasetDict, Split
from transformers.utils import logging

from cehrbert.data_generators.hf_data_generator import DEFAULT_INPATIENT_CONCEPT_ID, UNKNOWN_VALUE
from cehrbert.data_generators.hf_data_generator.hf_dataset import apply_cehrbert_dataset_mapping
Expand All @@ -23,6 +24,7 @@
"held_out": Split.TEST,
}
NON_ALPHANUMERIC_CHARS = r"[\w\/\\:\-_]"
LOG = logging.get_logger("meds_utils")


def get_meds_to_cehrbert_conversion_cls(
Expand Down Expand Up @@ -178,6 +180,13 @@ def create_dataset_from_meds_reader(
default_visit_id: int = 1,
is_pretraining: bool = True,
) -> DatasetDict:

LOG.info("The meds_to_cehrbert_conversion_type: %s", data_args.meds_to_cehrbert_conversion_type)
LOG.info("The att_function_type: %s", data_args.att_function_type)
LOG.info("The inpatient_att_function_type: %s", data_args.inpatient_att_function_type)
LOG.info("The include_auxiliary_token: %s", data_args.include_auxiliary_token)
LOG.info("The include_demographic_prompt: %s", data_args.include_demographic_prompt)

train_dataset = _create_cehrbert_data_from_meds(
data_args=data_args,
split="train",
Expand Down

0 comments on commit fe9e956

Please sign in to comment.