out of memory error should be fixed since it should be iterative now … #807
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 introduces a new example script for benchmarking StageNet with Integrated Gradients on MIMIC-IV, and significantly improves the efficiency and flexibility of the Integrated Gradients interpretability method. The main changes include memory optimizations, configurable step size, and improved handling of processor loading and dataset configuration in the example scripts.
Integrated Gradients Method Improvements:
IntegratedGradientsclass now accepts astepsparameter in its constructor, allowing users to set a default number of interpolation steps for the path integral approximation, which can be overridden per-call inattribute(). This makes the method more flexible and user-friendly. [1] [2] [3] [4] [5]_compute_final_attributionsmethod is updated to work with averaged gradients instead of lists, reflecting the new memory-efficient approach. [1] [2]New Example Script:
examples/interpretability/integrated_gradients_benchmark_stagenet.py, a comprehensive example demonstrating how to load MIMIC-IV data, use cached processors, apply the StageNet mortality prediction task, benchmark model performance, and compute Integrated Gradients attributions and faithfulness metrics.Dataset and Processor Handling Improvements:
num_workers) for dataset loading and task application inintegrated_gradients_mortality_mimic4_stagenet.py, which can improve data pipeline performance. [1] [2]These changes improve both the usability and performance of interpretability workflows in the codebase, especially for large datasets and models.…and at least I was able to test it