Skip to content

Commit

Permalink
upgraded cehrbert_data to v0.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaoPang committed Oct 9, 2024
1 parent 973861b commit 83a3dcf
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ dependencies = [
"Werkzeug==3.0.1",
"wandb==0.17.8",
"xgboost==2.0.3",
"cehrbert_data==0.0.1"
"cehrbert_data==0.0.3"
]

[tool.setuptools_scm]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@

import numpy as np
import pandas as pd
from cehrbert_data.decorators.patient_event_decorator import get_att_function
from cehrbert_data.const.common import NA
from cehrbert_data.decorators.patient_event_decorator_base import get_att_function
from datasets.formatting.formatting import LazyBatch
from dateutil.relativedelta import relativedelta
from meds.schema import birth_code, death_code
from pandas import Series

from cehrbert.models.hf_models.tokenization_hf_cehrbert import NA, CehrBertTokenizer
from cehrbert.models.hf_models.tokenization_hf_cehrbert import CehrBertTokenizer
from cehrbert.runners.hf_runner_argument_dataclass import DataTrainingArguments

birth_codes = [birth_code, "MEDS_BIRTH"]
Expand Down
3 changes: 2 additions & 1 deletion src/cehrbert/models/hf_models/tokenization_hf_cehrbert.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import numpy as np
import transformers
from cehrbert_data.const.common import NA
from datasets import Dataset, DatasetDict
from tokenizers import Tokenizer
from tokenizers.models import WordLevel
Expand All @@ -16,7 +17,7 @@
from tqdm import tqdm
from transformers.tokenization_utils_base import PushToHubMixin

from cehrbert.models.hf_models.tokenization_utils import NA, agg_helper, agg_statistics, map_statistics
from cehrbert.models.hf_models.tokenization_utils import agg_helper, agg_statistics, map_statistics
from cehrbert.runners.hf_runner_argument_dataclass import DataTrainingArguments

PAD_TOKEN = "[PAD]"
Expand Down
4 changes: 2 additions & 2 deletions src/cehrbert/models/hf_models/tokenization_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
from functools import partial
from typing import Any, Dict

from cehrbert.utils.stat_utils import TruncatedOnlineStatistics
from cehrbert_data.const.common import NA

NA = "N/A"
from cehrbert.utils.stat_utils import TruncatedOnlineStatistics


def load_json_file(json_file):
Expand Down
2 changes: 1 addition & 1 deletion src/cehrbert/runners/hf_runner_argument_dataclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from enum import Enum
from typing import Any, Dict, List, Literal, Optional

from cehrbert_data.decorators.patient_event_decorator import AttType
from cehrbert_data.decorators.patient_event_decorator_base import AttType

from cehrbert.data_generators.hf_data_generator.meds_to_cehrbert_conversion_rules import (
MedsToBertMimic4,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import unittest
from datetime import datetime

from cehrbert_data.decorators.patient_event_decorator import AttType
from cehrbert_data.decorators.patient_event_decorator_base import AttType

from cehrbert.data_generators.hf_data_generator.hf_dataset_mapping import MedToCehrBertDatasetMapping
from cehrbert.med_extension.schema_extension import CehrBertPatient, Event, Visit
Expand Down

0 comments on commit 83a3dcf

Please sign in to comment.