Releases: DeepPSP/torch_ecg
Releases · DeepPSP/torch_ecg
v0.0.31
0.0.31 - 2025-01-28
Added
- Add functions for downloading PhysioNet data from AWS S3. It is now made the default way to download data from PhysioNet.
- Add
easydictas a dependency for backward compatibility (loading old models using safe-modetorch.loadwithweights_only=True. Extra dependencies are added withtorch.serialization.add_safe_globals).
Changed
- Test files (in the
sample-datadirectory) are updated. - Add keyword argument
weights_onlytofrom_checkpointandfrom_remotemethods of the models (indeed theCkptMixinclass). The default value is"auto", which means the behavior is the same as before. It checks iftorch.serializationhasadd_safe_globalsattribute. If it does, it will use safe-modetorch.loadwithweights_only=True. Otherwise, it will usetorch.loadwithweights_only=False.
Deprecated
- Support for Python 3.7, 3.8 is deprecated. The minimum supported Python version is now 3.9. In the
pyproject.tomlfile, the fieldrequires-pythonis updated from>=3.7to>=3.9.
Removed
- Restrictions on the version of
wfdbandnumpypackages are removed.
Fixed
- Fix IO issues with several PhysioNet databases.
Security
- Models are now loaded using safe-mode
torch.loadwithweights_only=Trueby default.
v0.0.30
0.0.30 - 2024-10-10
Added
- Add support for AWS S3 in the download utility function
http_getin thetorch_ecg.utils.downloadmodule. PhysioNet now provides data download links from AWS S3, and the download utility function can now handle these links if AWS CLI is installed. This feature is implemented but not put into use yet.
Changed
- Change the default value of the
methodargument of thetorch_ecg.utils.utils_signal.resample_irregular_timeseriesfunction from"spline"to"interp1d". The former is probably not correctly implemented. - Update the logger classes: add checking of the write access of the
log_dir. If the directory is not writable, the default log dir~/.cache/torch_ecg/logsis used (ref.torch_ecg.cfg.DEFAULTS.log_dir). - Update the selection mechanism of the final model for the trainer classes: if no monitor is specified, the last model is selected by default (previously, no model was selected and saved).
- The main part of the
_setup_criterionmethod of theBaseTrainerclass is moved to the functionsetup_criterionin thetorch_ecg.models.lossmodule. The method is simplified and enhanced.
Deprecated
- Script
setup.pyis deprecated. The package building system is switched tohatchling.
Removed
- Remove redundancy in base trainer classes: identical
ifblocks are removed from the_setup_criterionmethod of theBaseTrainerclass.
Fixed
- Fix potential error in getting model name in the trainer classes.
- Fix bugs in the
CINC2020andCINC2021database reader classes for parsing the header files.
v0.0.29
0.0.29 - 2024-07-21
Added
- Add keyword argument
with_suffixto functiontorch_ecg.utils.misc.get_record_list_recursive3. - Add function
_download_from_google_driveto thetorch_ecg.utils.downloadmodule for downloading files from Google Drive. - Add
gdownas a dependency in therequirements.txtfile. - Add database reader class
PTBXLPlusfor the PTB-XL+ database intorch_ecg.databases.physionet_databases. - Add github-release job to the publish action for creating a release on GitHub automatically.
Changed
- Improve the main training loop method of the base trainer class
torch_ecg.components.trainers.BaseTrainer. - Allow passing additional keyword arguments to pass to
requests.headin theurl_is_reachablefunction of thetorch_ecg.utils.downloadmodule (via adding the**kwargsargument). - Restrict version of
numpyto be<=2.0.0in therequirements.txtfile.numpyversion2.0.0is a breaking update, and a large proportion of the dependencies of this project are not compatible with it yet. - Enhance the
cls_to_binfunction and rename it toone_hot_encodein thetorch_ecg.utils.utils_datamodule.
Fixed
- Enhance compatibility for different
pandasversions. - Fix errors for taking length of an empty database reader class.
Security
The First GitHub Release
0.0.14 - 2022-04-10
Added
- Implements the lead-wise mechanism (as a method
_assign_weights_lead_wise) for theConv_Bn_Activationlayer in thetorch_ecg.models._netsmodule. - Implements
assign_weights_lead_wisefor modelMultiScopicCNN(intorch_ecg.models). - Zenodo configuration file
.zenodo.jsonis added.
Changed
- Update the
READMEfile: add:point_right: [Back to TOC](#torch_ecg)to the end of long sections.
Fixed
- Fix errors in the computation of classification metrics.