Commit Graph

64 Commits

Author SHA1 Message Date
6e76d67a10 Enhance _maybe_torch_compile and add _maybe_cudagraph_mark_step_begin for improved CUDA Graphs handling 2026-01-18 18:04:54 +08:00
a4b19b6e08 Enhance LandmarkEvaluator with model compilation and optimization options 2026-01-18 17:56:59 +08:00
014393a33f Add support for evaluation indices in LandmarkEvaluator class 2026-01-18 17:43:47 +08:00
0057bc0dd9 Refactor evaluation scripts for multi-GPU execution
- Removed `run_evaluations_multi_gpu.sh` script as it was redundant.
- Updated `run_experiments_multi_gpu.sh` to handle evaluation jobs instead of training.
- Changed command-line options to support evaluation-specific parameters.
- Implemented run directory discovery and validation for evaluation jobs.
- Enhanced logging to capture evaluation details and outputs.
- Added options for centralized output management and skipping existing results.
2026-01-18 17:38:20 +08:00
b80d9a4256 Remove evaluate_next_event.py and utils.py files to streamline the codebase. These files contained functions and classes related to evaluation and utility operations that are no longer needed. 2026-01-18 15:41:07 +08:00
1d682c130d Implement control for implicit parallelism using --max_cpu_cores argument 2026-01-18 00:06:33 +08:00
cfe7f88162 Add --max_cpu_cores argument for parallel processing in evaluation scripts 2026-01-17 23:53:24 +08:00
248fb09c34 Refactor run_evaluations_multi_gpu.sh to remove --tau-short requirement and add support for next-args and horizon-args files 2026-01-17 23:39:55 +08:00
4686b56336 Refactor next-event evaluation to use next-token scores and implement clean control AUC metrics 2026-01-17 23:34:19 +08:00
e56068e668 Add compare_models.py for model evaluation with primary metrics and age-bin validation 2026-01-17 16:12:56 +08:00
fcd948818c Enhance next-event evaluation with age-bin metrics and diagnostic AUC outputs 2026-01-17 15:31:12 +08:00
197842b1a6 Add script for multi-GPU evaluations with flexible options and logging 2026-01-17 14:56:45 +08:00
a90f22a865 Enhance HealthDataset with caching for event tensors and update evaluation scripts to use test subsets 2026-01-17 14:42:02 +08:00
7840a4c53e Refactor next-event evaluation logic and add age-bin metrics output 2026-01-17 14:09:50 +08:00
67f92ce6c4 Add tqdm progress bar support and disable option for evaluation scripts 2026-01-17 14:00:42 +08:00
bfab601a77 Add evaluation scripts for next-event prediction and horizon-capture evaluation with detailed metric disclaimers 2026-01-17 13:49:39 +08:00
07916ee529 Remove torch_metrics.py file to streamline evaluation metrics implementation 2026-01-17 13:14:43 +08:00
c1bba30de4 Remove evaluation_age_time_dependent.py and utils.py files
- Deleted the entire evaluation_age_time_dependent.py file which contained functions for evaluating age-dependent metrics, including various statistical calculations and data aggregation methods.
- Removed utils.py file that provided utility functions for sampling context in fixed age bins and multi-hot encoding for disease occurrences.
2026-01-17 09:53:15 +08:00
a637beb220 Add function to drop zero-positive rows and update CSV export logic in age-bin evaluation 2026-01-16 17:51:00 +08:00
4068310a12 Refactor aggregation logic in age-bin results to handle pandas version compatibility 2026-01-16 17:24:53 +08:00
810c75e6d1 Add binary metrics computation and refactor evaluation logic in age-bin evaluation 2026-01-16 17:19:27 +08:00
b1647d1b74 Refactor tqdm import handling and improve context sampling in utils.py 2026-01-16 16:57:35 +08:00
e47a7ce4d6 Add multi-GPU support for age-bin evaluation and refactor aggregation logic 2026-01-16 16:27:02 +08:00
7a1210b5b0 Fix tqdm import handling by removing try-except block and ensuring proper import 2026-01-16 16:14:16 +08:00
90dffc3211 Add evaluation scripts for age-bin time-dependent metrics and remove obsolete evaluation_time_dependent.py 2026-01-16 16:13:31 +08:00
502ddd153b Refactor context index selection in evaluate_time_dependent to improve horizon-specific eligibility handling 2026-01-16 15:01:35 +08:00
34d8d8ce9d Add evaluation and utility functions for time-dependent metrics
- Introduced `evaluate.py` for time-dependent evaluation of models, including data loading and model inference.
- Added `evaluation_time_dependent.py` to compute various evaluation metrics such as AUC, average precision, and precision/recall at specified thresholds.
- Implemented CIF calculation methods in `losses.py` for different loss types, including exponential and piecewise exponential models.
- Created utility functions in `utils.py` for context selection and multi-hot encoding of events within specified horizons.
2026-01-16 14:55:09 +08:00
660dc969bc Remove models_eval_example.json file containing model evaluation configurations. 2026-01-16 13:09:38 +08:00
2f46acf2bd Add Piecewise Exponential CIF Loss and update model evaluation for PWE 2026-01-15 11:36:24 +08:00
d8b322cbee Enhance Event Rate@K and Recall@K computations with random ranking baseline and additional metrics 2026-01-11 00:52:35 +08:00
4d53f52aa1 Refactor AUC computation methods and introduce Event Rate@K for cross-cause prioritization 2026-01-11 00:47:56 +08:00
d87752d1f8 Enhance evaluation metrics and progress visualization in model evaluation
- Introduced parallel processing for per-disease metrics using ThreadPoolExecutor.
- Added command-line arguments for metric workers and progress visualization options.
- Refactored evaluation functions to compute metrics for all diseases and summarize results.
- Updated output CSV filenames for clarity and consistency.
2026-01-10 23:49:37 +08:00
87baef3ecf Fix device transfer for sexes in predict_cifs_for_model function 2026-01-10 17:02:28 +08:00
029f147ab5 Implement feature X to enhance user experience and fix bug Y in module Z 2026-01-10 17:00:16 +08:00
b88518a03f Refactor model configurations in models_eval_example.json: update names, add loss_type and full_cov attributes for Delphi and SAP Delphi models. 2026-01-10 14:29:15 +08:00
320597dcde Fix checkpoint path for sap_delphi_discrete_time_cif_partcov model in evaluation examples 2026-01-10 12:31:47 +08:00
b64ba101c2 Add sap_delphi_discrete_time_cif_partcov model configuration to evaluation examples 2026-01-10 12:22:14 +08:00
f795aa5604 Fix survival calculation in cifs_from_exponential_logits: broadcast mask for compatibility with tensor shapes 2026-01-10 11:42:03 +08:00
f231a2e4e5 Add model evaluation configurations for Delphi and SAP Delphi models
- Introduced a new JSON file `models_eval_example.json` containing evaluation configurations for various models.
- Included configurations for `delphi_fork` and `sap_delphi` models with different loss types and full covariance settings.
- Each model entry specifies the model name, type, loss type, full covariance flag, and checkpoint path.
2026-01-10 11:37:12 +08:00
3f15301f26 Enhance multi-GPU experiment runner: add log directory option, improve logging with sanitized filenames, and capture command output in log files. 2026-01-09 18:46:59 +08:00
5f8360a24a Update experiments configuration: replace PiecewiseExponentialLoss with DiscreteTimeCIFNLLLoss for delphi_fork and sap_delphi models 2026-01-09 18:44:16 +08:00
739eb326f2 Fix formatting in DiscreteTimeCIFNLLLoss documentation for clarity 2026-01-09 18:34:01 +08:00
209dde2299 Refactor loss functions and model architecture: replace PiecewiseExponentialLoss with DiscreteTimeCIFNLLLoss, update Trainer to use SimpleHead, and modify argument parsing for new loss type. 2026-01-09 18:31:38 +08:00
880fd53a4b Enhance Trainer class: add logging for WeibullNLLLoss parameters during training and validation 2026-01-09 13:48:36 +08:00
8723bf7600 Enhance Trainer class: add delta_scale logging for improved training statistics 2026-01-09 13:28:11 +08:00
dc34d51864 Add rank parameter to TrainConfig and update argument parsing for low-rank parameterization 2026-01-09 13:18:09 +08:00
1fa6d55d79 Refactor PiecewiseExponentialLoss and WeibullNLLLoss: remove lightweight numerical protections and improve error handling for input validation 2026-01-09 13:06:43 +08:00
b54c54a60b Refactor Trainer class: improve training statistics calculation and logging for NLL and regularization 2026-01-09 12:49:29 +08:00
aff0fe480b Refactor model and training scripts: remove unused imports and add FactorizedHead class for improved modularity 2026-01-09 12:01:52 +08:00
c70c3cd71e Reorganize import statements for consistency and clarity in model and training scripts 2026-01-09 10:16:03 +08:00