justin13601 / ACES

ACES: Automatic Cohort Extraction System for Event-Streams
https://eventstreamaces.readthedocs.io/en/latest/
MIT License
25 stars 1 forks source link

Add predicate warning or specific error code #146

Closed rvandewater closed 3 weeks ago

rvandewater commented 4 weeks ago

This problem was encountered with MEDS-DEV (see: https://github.com/mmcdermott/MEDS-DEV/issues/28). AUMCdb, another dataset to be added ( see https://github.com/mmcdermott/MEDS-DEV/pull/27), did not define a predicate that was in the task.yaml. This threw the slightly cryptic error code below. It might make sense to check the predicates to make sure they are defined in a certain situation.

Error executing job with overrides: ['data.shard=tuning/0']                                                                                                             
Traceback (most recent call last):                                                                                                                                          
File "/dhc/home/robin.vandewater/conda3/envs/MEDS-DEV/lib/python3.12/site-packages/aces/__main__.py", line 159, in main                                                     task_cfg = config.TaskExtractorConfig.load(                                                                                                                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                            
File "/dhc/home/robin.vandewater/conda3/envs/MEDS-DEV/lib/python3.12/site-packages/aces/config.py", line 1295, in load                                                      config_data = {k: v for k, v in p.items() if k in PlainPredicateConfig.__dataclass_fields__}                                                                                                            ^^^^^^^                                                                                                                             
AttributeError: 'str' object has no attribute 'items'
justin13601 commented 4 weeks ago

Thanks! Makes sense, will add a message to check specifically for ??? since we are using that as a placeholder for undefined predicates.

justin13601 commented 3 weeks ago

Closed by #147