Skip to content

[pre-commit.ci] pre-commit autoupdate#47

Open
pre-commit-ci[bot] wants to merge 1 commit into
masterfrom
pre-commit-ci-update-config
Open

[pre-commit.ci] pre-commit autoupdate#47
pre-commit-ci[bot] wants to merge 1 commit into
masterfrom
pre-commit-ci-update-config

Conversation

@pre-commit-ci

@pre-commit-ci pre-commit-ci Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

updates:
- [github.com/pycqa/isort: 9.0.0a3 → 9.0.0b1](PyCQA/isort@9.0.0a3...9.0.0b1)
@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

❌ 2 Tests Failed:

Tests completed Failed Passed Skipped
483 2 481 34
View the full list of 2 ❄️ flaky test(s)
test/test_databases/test_cpsc2020.py::TestCPSC2020::test_locate_premature_beats

Flake rate in main: 100.00% (Passed 0 times, Failed 6 times)

Stack Traces | 0.003s run time
self = <test_cpsc2020.TestCPSC2020 object at 0x7f1d1216feb0>

    def test_locate_premature_beats(self):
>       premature_beat_intervals = reader.locate_premature_beats(0)

test/test_databases/test_cpsc2020.py:78: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.../databases/cpsc_databases/cpsc2020.py:577: in locate_premature_beats
    premature_intervals = get_optimal_covering(
torch_ecg/utils/utils_interval.py:584: in get_optimal_covering
    if (tot_start > min([item if isinstance(item, (int, float)) else item[0] for item in to_cover])) or (
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

.0 = <iterator object at 0x7f1c9ad3a080>

>   if (tot_start > min([item if isinstance(item, (int, float)) else item[0] for item in to_cover])) or (
        tot_end < max([item if isinstance(item, (int, float)) else item[-1] for item in to_cover])
    ):
E   IndexError: invalid index to scalar variable.

torch_ecg/utils/utils_interval.py:584: IndexError
test/test_models/test_loss.py::test_setup_criterion

Flake rate in main: 60.00% (Passed 2 times, Failed 3 times)

Stack Traces | 0.003s run time
def test_setup_criterion():
        criterion = setup_criterion("WeightedBCELoss", pos_weight=torch.ones((1, 2)))
        criterion = setup_criterion("BCEWithLogitsWithClassWeightLoss", class_weight=class_weight)
        criterion = setup_criterion("FocalLoss", class_weight=class_weight)
        criterion = setup_criterion("AsymmetricLoss")
        criterion = setup_criterion("MaskedBCEWithLogitsLoss")
    
        for name in torch.nn.modules.loss.__all__:
>           criterion = setup_criterion(name)

test/test_models/test_loss.py:152: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

name = 'LinearCrossEntropyLoss', kwargs = {}

    def setup_criterion(name: str, **kwargs: Any) -> nn.Module:
        """Setup the criterion (loss function).
    
        Parameters
        ----------
        name : str
            The name of the criterion.
        **kwargs : Any
            The keyword arguments for the criterion.
    
        Returns
        -------
        nn.Module
            The criterion (loss function).
    
        """
        if name in LOSSES:
            return LOSSES.build(name, **kwargs)
        if name.startswith("nn."):
            criterion = eval(name)(**kwargs)
        elif name in nn.modules.loss.__all__:
>           criterion = getattr(nn, name)(**kwargs)
E           TypeError: LinearCrossEntropyLoss.__init__() missing 2 required positional arguments: 'in_features' and 'num_classes'

torch_ecg/models/loss.py:660: TypeError

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants