Skip to content

Releases: DeepPSP/torch_ecg

v0.0.31

28 Jan 15:37
f7b60bc

Choose a tag to compare

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 easydict as a dependency for backward compatibility (loading old models using safe-mode torch.load with weights_only=True. Extra dependencies are added with torch.serialization.add_safe_globals).

Changed

  • Test files (in the sample-data directory) are updated.
  • Add keyword argument weights_only to from_checkpoint and from_remote methods of the models (indeed the CkptMixin class). The default value is "auto", which means the behavior is the same as before. It checks if torch.serialization has add_safe_globals attribute. If it does, it will use safe-mode torch.load with weights_only=True. Otherwise, it will use torch.load with weights_only=False.

Deprecated

  • Support for Python 3.7, 3.8 is deprecated. The minimum supported Python version is now 3.9. In the pyproject.toml file, the field requires-python is updated from >=3.7 to >=3.9.

Removed

  • Restrictions on the version of wfdb and numpy packages are removed.

Fixed

  • Fix IO issues with several PhysioNet databases.

Security

  • Models are now loaded using safe-mode torch.load with weights_only=True by default.

v0.0.30

10 Oct 03:08
4346922

Choose a tag to compare

0.0.30 - 2024-10-10

Added

  • Add support for AWS S3 in the download utility function http_get in the torch_ecg.utils.download module. 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 method argument of the torch_ecg.utils.utils_signal.resample_irregular_timeseries function 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/logs is 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_criterion method of the BaseTrainer class is moved to the function setup_criterion in the torch_ecg.models.loss module. The method is simplified and enhanced.

Deprecated

  • Script setup.py is deprecated. The package building system is switched to hatchling.

Removed

  • Remove redundancy in base trainer classes: identical if blocks are removed from the _setup_criterion method of the BaseTrainer class.

Fixed

  • Fix potential error in getting model name in the trainer classes.
  • Fix bugs in the CINC2020 and CINC2021 database reader classes for parsing the header files.

v0.0.29

21 Jul 04:14
8d6a12e

Choose a tag to compare

0.0.29 - 2024-07-21

Added

  • Add keyword argument with_suffix to function torch_ecg.utils.misc.get_record_list_recursive3.
  • Add function _download_from_google_drive to the torch_ecg.utils.download module for downloading files from Google Drive.
  • Add gdown as a dependency in the requirements.txt file.
  • Add database reader class PTBXLPlus for the PTB-XL+ database in torch_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.head in the url_is_reachable function of the torch_ecg.utils.download module (via adding the **kwargs argument).
  • Restrict version of numpy to be <=2.0.0 in the requirements.txt file. numpy version 2.0.0 is a breaking update, and a large proportion of the dependencies of this project are not compatible with it yet.
  • Enhance the cls_to_bin function and rename it to one_hot_encode in the torch_ecg.utils.utils_data module.

Fixed

  • Enhance compatibility for different pandas versions.
  • Fix errors for taking length of an empty database reader class.

Security

  • Fix code scanning alert - Incomplete regular expression for hostnames #21.
  • Fix code scanning alert - Incomplete URL substring sanitization #23.

The First GitHub Release

10 Apr 14:38
e9f0ee7

Choose a tag to compare

0.0.14 - 2022-04-10

Added

  • Implements the lead-wise mechanism (as a method _assign_weights_lead_wise) for the Conv_Bn_Activation layer in the torch_ecg.models._nets module.
  • Implements assign_weights_lead_wise for model MultiScopicCNN (in torch_ecg.models).
  • Zenodo configuration file .zenodo.json is added.

Changed

  • Update the README file: add :point_right: [Back to TOC](#torch_ecg) to the end of long sections.

Fixed

  • Fix errors in the computation of classification metrics.