Skip to content

Commit

Permalink
added the missing positional parameter for _create_cehrbert_data_from…
Browse files Browse the repository at this point in the history
…_meds
  • Loading branch information
ChaoPang committed Sep 7, 2024
1 parent 35a2326 commit db1ec98
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cehrbert/data_generators/hf_data_generator/meds_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def get_meds_to_cehrbert_conversion_cls(
meds_to_cehrbert_conversion_type: MedsToCehrBertConversionType,
) -> MedsToCehrBertConversion:
for cls in MedsToCehrBertConversion.__subclasses__():
if meds_to_cehrbert_conversion_type.name == cls.__name__:
if meds_to_cehrbert_conversion_type.__name__ == cls.__name__:
return cls()
raise RuntimeError(f"{meds_to_cehrbert_conversion_type} is not a valid MedsToCehrBertConversionType")

Expand Down Expand Up @@ -445,6 +445,7 @@ def _create_cehrbert_data_from_meds(
_meds_to_cehrbert_generator,
path_to_db=data_args.data_folder,
default_visit_id=default_visit_id,
meds_to_cehrbert_conversion_type=data_args.meds_to_cehrbert_conversion_type,
)
dataset = Dataset.from_generator(
batch_func,
Expand Down

0 comments on commit db1ec98

Please sign in to comment.