Torch-ecg

Latest version: v0.0.31

Safety actively analyzes 723158 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 6

0.0.25

----------------------------------------------------------------------------------------

Added
~~~~~

- Add docstring utility function ``remove_parameters_returns_from_docstring``
in ``torch_ecg.utils.misc``.
- Add abstract property ``database_info`` to the base class ``_DataBase`` in
``torch_ecg.databases.base`` so that when implementing a new database reader
class that inherits from the base class, its ``DataBaseInfo`` must be
implemented and assigned to the property.
- Add method ``get_citation`` to the base abstract class ``_DataBase`` in
``torch_ecg.databases.base`` which enhances the process for getting citations
for the databases.
- Add database reader class ``CACHET_CADB`` for the CACHET-CADB database in
``torch_ecg.databases.other_databases``.
- Add ``download`` method for the base abstract class ``CPSCDataBase`` in
``torch_ecg.databases.base``.

Changed
~~~~~~~

- Improve the warning message for passing an non-existing path when
initializing a database reader class.
- Change the default behavior of the ``download`` method for
``PhysioNetDataBase`` class: default to download the compressed
version of the database.
- Update the ``README`` file in the ``torch_ecg/databases`` directory.

Fixed
~~~~~

- Use ``register_buffer`` in custom loss classes for constant tensors
to avoid potential device mismatch issues.
- Rename and update the data file ``physionet_dbs.csv.tar.gz`` to
``physionet_dbs.csv.gz`` to comply with the changement of the
``pandas.read_csv`` function from version 1.4.x to 1.5.x.
- Fix the incorrect usage of ``NoReturn`` type hints. It is replaced
with ``None`` to indicate that the function/method does not return
anything.

0.0.24

-----------------------------

This release was yanked.

0.0.23

----------------------------------------------------------------------------------------

Added
~~~~~

- Add ``collate_fn`` as an optional argument for ``BaseTrainer`` class
in ``torch_ecg.components.trainers``.

Changed
~~~~~~~

- Let ``db_dir`` attribute of the database reader classes be absolute
when instantiated, to avoid potential ``pathlib`` errors.
- Update utility function `torch_ecg.utils.utils_nn.adjust_cnn_filter_lengths``:
avoid assigning unnecessary fs to dict-type config items; change default
value of the ``pattern`` argument from ``"filter_length|filt_size"`` to
``"filter_length|filter_size"`` to avoid unintended changement of configs
for ``BlurPool`` (in ``torch_ecg.models._nets``).
- Enhance error message for ``BlurPool`` in ``torch_ecg.models._nets``.

0.0.22

----------------------------------------------------------------------------------------

Changed
~~~~~~~

- Make utility function ``torch_ecg.utils.utils_data.default_collate_fn``
support ``dict`` type batched data.
- Update docstrings of several metrics utility functions in
``torch_ecg.utils.utils_metrics``.

0.0.21

----------------------------------------------------------------------------------------

Added
~~~~~

- Add utility function ``get_kwargs`` in ``torch_ecg.utils.misc`` for
getting (keyword) arguments from a function/method.
- Add AHA diagnosis statements in ``torch_ecg.databases.aux_data``.
- Add argument ``reset_index`` to the utility function
``torch_ecg.utils.utils_data.stratified_train_test_split``.
- Add ``typing-extensions`` as a dependency in the ``requirements.txt``
file.
- Add database reader class ``QTDB`` for the QTDB database in
``torch_ecg.databases.physionet_databases``.

Changed
~~~~~~~

- Enhance data handling (typicall when using the ``load_data`` method of
the database reader classes) with precise dtypes via
``torch_ecg.cfg.DEFAUTLS``.
- Update the setup of optimizer for the base trainer class
``torch_ecg.components.trainers.BaseTrainer``.
- Update the ``DataBaseInfo`` class for the ``SPH`` database.
- Update the ``README`` file in the ``torch_ecg/databases`` directory.
- Update plotted figures of the benchmark studies.
- Rename ``SequenceLabelingOutput`` to ``SequenceLabellingOutput``
(typo fixed) in the ``torch_ecg.components.outputs`` module.
- Enhance docstring of ``LUDB`` database reader class via updating its
``DataBaseInfo`` class.
- Append the ``_ls_rec`` method as the last step in the ``download``
method of the database reader classes.
- Change ``torch_ecg.utils.utils_data.ECGWaveForm`` from a ``namedtuple``
to a ``dataclass``.

Removed
~~~~~~~

- ``bib_lookup.py`` is removed from the project. It is now delivered in
an isolated package ``bib_lookup`` published on PyPI, and added as a
dependency in the ``requirements.txt`` file.
- Remove unnecessary script ``exec_git.py``.
- Remove ``joblib`` in the ``requirements.txt`` file.

0.0.20

----------------------------------------------------------------------------------------

Added
~~~~~

- Add database reader class ``SPH`` for the SPH database in
``torch_ecg.databases.other_databases``.
- Add ``dataclass`` ``DataBaseInfo`` for storing information of a
database. It has attributes ``title``, ``about``, ``note``,
``usage``, ``issues``, ``reference``, etc., and has a method
``format_database_docstring`` for formatting the docstring of a
database reader class. The generated docstring can be assigned to
corresponding database reader class via the ``add_docstring``
decorator (in ``torch_ecg.utils.misc``).
- Add default cache directory ``~/.cache/torch_ecg`` for storing
downloaded data files, model weight files, etc.
- Add helper function ``is_compressed_file`` for checking if a file is
compressed in ``torch_ecg.utils.download``.

Page 2 of 6

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.