• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ContinualAI / avalanche / 5600673849

pending completion
5600673849

Pull #1463

github

web-flow
Merge abde4c21e into 435b40d2b
Pull Request #1463: Various fixes and improvements

19 of 70 new or added lines in 7 files covered. (27.14%)

2 existing lines in 2 files now uncovered.

16709 of 22963 relevant lines covered (72.76%)

2.89 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

47.62
/tests/test_core50.py
1
################################################################################
2
# Copyright (c) 2021 ContinualAI.                                              #
3
# Copyrights licensed under the MIT License.                                   #
4
# See the accompanying LICENSE file for terms.                                 #
5
#                                                                              #
6
# Date: 1-05-2020                                                              #
7
# Author(s): Vincenzo Lomonaco                                                 #
8
# E-mail: contact@continualai.org                                              #
9
# Website: www.continualai.org                                                 #
10
################################################################################
11

12
""" CORe50 Tests"""
4✔
13

14
import unittest
4✔
15

16
from avalanche.benchmarks.classic import CORe50
4✔
17
from tests.unit_tests_utils import FAST_TEST, is_github_action
4✔
18

19

20
class CORe50Test(unittest.TestCase):
4✔
21
    @unittest.skipIf(
4✔
22
        FAST_TEST or is_github_action(),
23
        "We don't want to download large datasets in github actions.",
24
    )
25
    def test_core50_ni_benchmark(self):
3✔
26
        benchmark = CORe50(scenario="ni")
×
27
        for experience in benchmark.train_stream:
×
28
            pass
×
29

30
    @unittest.skipIf(
4✔
31
        FAST_TEST or is_github_action(),
32
        "We don't want to download large datasets in github actions.",
33
    )
34
    def test_core50_nc_benchmark(self):
3✔
35
        benchmark_instance = CORe50(scenario="nc")
×
36
        self.assertEqual(1, len(benchmark_instance.test_stream))
×
37

38
        classes_in_test = benchmark_instance.classes_in_experience["test"][0]
×
39
        self.assertSetEqual(set(range(50)), set(classes_in_test))
×
40

41
        # Regression tests for issue #774
NEW
42
        self.assertSequenceEqual([10] + ([5] * 8), benchmark_instance.n_classes_per_exp)
×
NEW
43
        self.assertSetEqual(set(range(50)), set(benchmark_instance.classes_order))
×
NEW
44
        self.assertEqual(50, len(benchmark_instance.classes_order))
×
45

46

47
if __name__ == "__main__":
4✔
48
    unittest.main()
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc