update benchmark examples and pypi ver. #762
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request adds two new benchmarking scripts for drug recommendation tasks using the MIMIC-IV dataset and updates the installation documentation to clarify Python version requirements and recommended package versions. The new scripts provide reproducible performance measurements for both single-threaded pandas processing and parallelized PyHealth task processing with configurable worker counts, including detailed tracking of memory usage and cache sizes.
Benchmarking scripts for drug recommendation:
examples/benchmark_perf/benchmark_pandas_drug_rec.py, a standalone pandas-based benchmark for the MIMIC-IV drug recommendation task, including cumulative visit history construction, memory tracking, and result reporting.examples/benchmark_perf/benchmark_workers_n_drug_recommendation.py, a benchmarking script that measures PyHealth's drug recommendation task performance across multiplenum_workersvalues. It tracks dataset/task cache sizes, peak memory usage (including child processes), and supports repeated runs for robust statistics. Results are written to CSV for analysis.Documentation updates:
docs/install.rstto clarify that PyHealth 2.0 requires Python 3.12 or higher (up to 3.13), reflecting a hard dependency on modern Python features. Also updated recommended and legacy version installation instructions and notes.