html/0000755000175000017500000000000015047037337011717 5ustar jenkinsjenkinshtml/z_7eb9929a84352c92_test_parallel_resume_py.html0000644000175000017500000005424015047037077022246 0ustar jenkinsjenkins Coverage for /home/jenkins/mindspore/testcases/testcases/tests/st/networks/large_models/resume/test_parallel_resume.py: 82%

Coverage for /home/jenkins/mindspore/testcases/testcases/tests/st/networks/large_models/resume/test_parallel_resume.py: 82%

28 statements  

« prev     ^ index     » next       coverage.py v7.5.4a0.dev2, created at 2025-08-13 15:26 +0800

1# Copyright 2025 Huawei Technologies Co., Ltd 

2# 

3# Licensed under the Apache License, Version 2.0 (the "License"); 

4# you may not use this file except in compliance with the License. 

5# You may obtain a copy of the License at 

6# 

7# http://www.apache.org/licenses/LICENSE-2.0 

8# 

9# Unless required by applicable law or agreed to in writing, software 

10# distributed under the License is distributed on an "AS IS" BASIS, 

11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 

12# See the License for the specific language governing permissions and 

13# limitations under the License. 

14# ============================================================================ 

15""" 

16Test module for testing resume training from specified checkpoint. 

17How to run this: 

18 pytest tests/st/networks/large_models/resume/test_parallel_resume.py 

19""" 

20 

21import os 

22import shutil 

23 

24from tests.mark_utils import arg_mark 

25from resume_train_utils import extract_loss_values 

26 

27 

28def remove_folder(folder_path): 

29 """ 

30 If the folder exists, delete it and all its contents. 

31 

32 Args: 

33 folder_path: The path to the folder to delete. 

34 """ 

35 if os.path.exists(folder_path): 35 ↛ 42line 35 didn't jump to line 42 because the condition on line 35 was always true

36 try: 

37 shutil.rmtree(folder_path) 

38 print(f"Directory '{folder_path}' has been removed.") 

39 except OSError as e: 

40 print(f"Remove directory '{folder_path}' failed: {e}") 

41 else: 

42 print(f"Directory '{folder_path}' is not exist.") 

43 

44 

45class TestResumeTraining: 

46 """A test class for testing pipeline.""" 

47 

48 @arg_mark(plat_marks=['platform_ascend910b'], level_mark='level1', card_mark='allcards', essential_mark='essential') 

49 def test_train(self): 

50 """ 

51 Feature: Trainer.train() 

52 Description: Test parallel trainer for train. 

53 Expectation: AssertionError 

54 """ 

55 ascend_home_path = os.getenv('ASCEND_HOME_PATH') 

56 if not ascend_home_path: 56 ↛ 57line 56 didn't jump to line 57 because the condition on line 56 was never true

57 os.environ['ASCEND_HOME_PATH'] = "/usr/local/Ascend/latest" 

58 

59 sh_path = os.path.split(os.path.realpath(__file__))[0] 

60 ret = os.system(f"export ASCEND_RT_VISIBLE_DEVICES=0,1,2,3 && " 

61 f"bash {sh_path}/msrun_launch.sh 4") 

62 

63 os.system(f"grep -E 'ERROR|error' {sh_path}/msrun_log/worker_3.log -C 3") 

64 assert ret == 0 

65 

66 loss = extract_loss_values("msrun_log/worker_3.log") 

67 

68 resume_start = 256 

69 train_middle = 128 

70 for i in range(0, 10): 

71 assert abs(loss[resume_start + i] - loss[train_middle + i]) < 0.005 

72 

73 remove_folder("./output/test_resume_parallel/checkpoint") 

html/z_6beee35d4c9fca87_random_generator_py.html0000644000175000017500000005717615047037077021750 0ustar jenkinsjenkins Coverage for /home/jenkins/mindspore/testcases/testcases/tests/st/common/random_generator.py: 26%

Coverage for /home/jenkins/mindspore/testcases/testcases/tests/st/common/random_generator.py: 26%

32 statements  

« prev     ^ index     » next       coverage.py v7.5.4a0.dev2, created at 2025-08-13 15:26 +0800

1import numpy as np 

2 

3 

4def _generate_numpy_random_input(shape, dtype, name='', method='', *, low=None, high=None, seed=None): 

5 """ 

6 Description: Generate numpy.ndarray with random seed. 

7 Args: 

8 shape(tuple[int]): The shape of numpy.ndarray. 

9 dtype(np.dtype): The dtype of numpy.ndarray. 

10 name(str): The name of numpy.ndarray will be used in test cases, eg: 'input', 'grad'. 

11 method(str): Use np.random.'method' to generate numpy.ndarray. 

12 low(number): Lowest number. 

13 high(number): Highest number. 

14 seed(number): Set random seed, will be used fo debugging. 

15 Output: 

16 numpy.ndarray 

17 """ 

18 if seed is None: 

19 seed = get_numpy_global_seed() 

20 np.random.seed(seed) 

21 print(f"random_generator: generate a numpy.ndarray(shape={shape}, dtype={dtype}, seed={seed}) by " 

22 f"numpy.random.{method}, will be used as {name}") 

23 if method == "randn": 

24 return np.random.randn(*shape).astype(dtype) 

25 if method == "randint": 

26 return np.random.randint(low, high, shape, dtype=dtype) 

27 if method == "uniform": 

28 return np.random.uniform(low, high, shape).astype(dtype) 

29 raise TypeError(f"numpy.random.{method} is not impl.") 

30 

31 

32def get_numpy_global_seed(): 

33 return 1967515154 

34 

35 

36def set_numpy_global_seed(): 

37 np.random.seed(get_numpy_global_seed()) 

38 

39 

40def get_numpy_random_seed(): 

41 ii32 = np.iinfo(np.int32) 

42 seed = np.random.randint(0, ii32.max, size=1).astype(np.int32) 

43 return seed 

44 

45 

46def set_numpy_random_seed(seed=None): 

47 if seed is None: 

48 set_numpy_global_seed() 

49 else: 

50 print(f"random_generator: set random seed={seed} for numpy.random.method.") 

51 np.random.seed(seed) 

52 

53 

54def generate_numpy_ndarray_by_randn(shape, dtype, name='', seed=None): 

55 return _generate_numpy_random_input(shape, dtype, name, "randn", seed=seed) 

56 

57 

58def generate_numpy_ndarray_by_randint(shape, dtype, low, high=None, name='', seed=None): 

59 return _generate_numpy_random_input(shape, dtype, name, "randint", low=low, high=high, seed=seed) 

60 

61 

62def generate_numpy_ndarray_by_uniform(shape, dtype, low=0.0, high=1.0, name='', seed=None): 

63 return _generate_numpy_random_input(shape, dtype, name, "uniform", low=low, high=high, seed=seed) 

html/z_08cf99c50893ba22___init___py.html0000644000175000017500000001152215047037077017634 0ustar jenkinsjenkins Coverage for /home/jenkins/mindspore/testcases/testcases/tests/st/auto_parallel/__init__.py: 100%

Coverage for /home/jenkins/mindspore/testcases/testcases/tests/st/auto_parallel/__init__.py: 100%

0 statements  

« prev     ^ index     » next       coverage.py v7.5.4a0.dev2, created at 2025-08-13 15:26 +0800

html/function_index.html0000644000175000017500000005234715047037077015635 0ustar jenkinsjenkins Coverage report

Coverage report: 65%

Files Functions Classes

coverage.py v7.5.4a0.dev2, created at 2025-08-13 15:26 +0800

File function statements missing excluded branches partial coverage
/home/jenkins/mindspore/testcases/testcases/tests/__init__.py (no function) 0 0 0 0 0 100%
/home/jenkins/mindspore/testcases/testcases/tests/mark_utils.py arg_mark 14 4 0 8 4 64%
/home/jenkins/mindspore/testcases/testcases/tests/mark_utils.py arg_mark.decorator 7 0 0 2 0 100%
/home/jenkins/mindspore/testcases/testcases/tests/mark_utils.py (no function) 3 0 0 0 0 100%
/home/jenkins/mindspore/testcases/testcases/tests/st/__init__.py (no function) 0 0 0 0 0 100%
/home/jenkins/mindspore/testcases/testcases/tests/st/auto_parallel/__init__.py (no function) 0 0 0 0 0 100%
/home/jenkins/mindspore/testcases/testcases/tests/st/auto_parallel/test_auto_parallel_train.py test_msrun_auto_parallel_sharding_propagation 2 2 0 0 0 0%
/home/jenkins/mindspore/testcases/testcases/tests/st/auto_parallel/test_auto_parallel_train.py test_msrun_auto_parallel_recursive_programming 2 0 0 0 0 100%
/home/jenkins/mindspore/testcases/testcases/tests/st/auto_parallel/test_auto_parallel_train.py (no function) 6 0 0 0 0 100%
/home/jenkins/mindspore/testcases/testcases/tests/st/common/__init__.py (no function) 0 0 0 0 0 100%
/home/jenkins/mindspore/testcases/testcases/tests/st/common/random_generator.py _generate_numpy_random_input 11 11 0 8 0 0%
/home/jenkins/mindspore/testcases/testcases/tests/st/common/random_generator.py get_numpy_global_seed 1 0 0 0 0 100%
/home/jenkins/mindspore/testcases/testcases/tests/st/common/random_generator.py set_numpy_global_seed 1 0 0 0 0 100%
/home/jenkins/mindspore/testcases/testcases/tests/st/common/random_generator.py get_numpy_random_seed 3 3 0 0 0 0%
/home/jenkins/mindspore/testcases/testcases/tests/st/common/random_generator.py set_numpy_random_seed 4 4 0 2 0 0%
/home/jenkins/mindspore/testcases/testcases/tests/st/common/random_generator.py generate_numpy_ndarray_by_randn 1 1 0 0 0 0%
/home/jenkins/mindspore/testcases/testcases/tests/st/common/random_generator.py generate_numpy_ndarray_by_randint 1 1 0 0 0 0%
/home/jenkins/mindspore/testcases/testcases/tests/st/common/random_generator.py generate_numpy_ndarray_by_uniform 1 1 0 0 0 0%
/home/jenkins/mindspore/testcases/testcases/tests/st/common/random_generator.py (no function) 9 0 0 0 0 100%
/home/jenkins/mindspore/testcases/testcases/tests/st/networks/__init__.py (no function) 0 0 0 0 0 100%
/home/jenkins/mindspore/testcases/testcases/tests/st/networks/large_models/__init__.py (no function) 0 0 0 0 0 100%
/home/jenkins/mindspore/testcases/testcases/tests/st/networks/large_models/resume/__init__.py (no function) 0 0 0 0 0 100%
/home/jenkins/mindspore/testcases/testcases/tests/st/networks/large_models/resume/resume_train_utils.py extract_loss_values 9 0 0 4 0 100%
/home/jenkins/mindspore/testcases/testcases/tests/st/networks/large_models/resume/resume_train_utils.py get_file_mtime 1 1 0 0 0 0%
/home/jenkins/mindspore/testcases/testcases/tests/st/networks/large_models/resume/resume_train_utils.py (no function) 4 0 0 0 0 100%
/home/jenkins/mindspore/testcases/testcases/tests/st/networks/large_models/resume/test_parallel_resume.py remove_folder 7 3 0 2 1 56%
/home/jenkins/mindspore/testcases/testcases/tests/st/networks/large_models/resume/test_parallel_resume.py TestResumeTraining.test_train 13 1 0 4 1 88%
/home/jenkins/mindspore/testcases/testcases/tests/st/networks/large_models/resume/test_parallel_resume.py (no function) 8 0 0 0 0 100%
Total   108 32 0 30 6 65%

No items found using the specified filter.

html/z_c16fa8bbbad45d91___init___py.html0000644000175000017500000001143215047037077020121 0ustar jenkinsjenkins Coverage for /home/jenkins/mindspore/testcases/testcases/tests/st/__init__.py: 100%

Coverage for /home/jenkins/mindspore/testcases/testcases/tests/st/__init__.py: 100%

0 statements  

« prev     ^ index     » next       coverage.py v7.5.4a0.dev2, created at 2025-08-13 15:26 +0800

html/z_eb25ece5c67c0bc7___init___py.html0000644000175000017500000001150215047037077020123 0ustar jenkinsjenkins Coverage for /home/jenkins/mindspore/testcases/testcases/tests/st/networks/large_models/__init__.py: 100%

Coverage for /home/jenkins/mindspore/testcases/testcases/tests/st/networks/large_models/__init__.py: 100%

0 statements  

« prev     ^ index     » next       coverage.py v7.5.4a0.dev2, created at 2025-08-13 15:26 +0800

html/style_cb_718ce007.css0000644000175000017500000003411615047037077015401 0ustar jenkinsjenkins@charset "UTF-8"; /* Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 */ /* For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt */ /* Don't edit this .css file. Edit the .scss file instead! */ html, body, h1, h2, h3, p, table, td, th { margin: 0; padding: 0; border: 0; font-weight: inherit; font-style: inherit; font-size: 100%; font-family: inherit; vertical-align: baseline; } body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-size: 1em; background: #fff; color: #000; } @media (prefers-color-scheme: dark) { body { background: #1e1e1e; } } @media (prefers-color-scheme: dark) { body { color: #eee; } } html > body { font-size: 16px; } a:active, a:focus { outline: 2px dashed #007acc; } p { font-size: .875em; line-height: 1.4em; } table { border-collapse: collapse; } td { vertical-align: top; } table tr.hidden { display: none !important; } p#no_rows { display: none; font-size: 1.15em; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; } a.nav { text-decoration: none; color: inherit; } a.nav:hover { text-decoration: underline; color: inherit; } .hidden { display: none; } header { background: #f8f8f8; width: 100%; z-index: 2; border-bottom: 1px solid #ccc; } @media (prefers-color-scheme: dark) { header { background: black; } } @media (prefers-color-scheme: dark) { header { border-color: #333; } } header .content { padding: 1rem 3.5rem; } header h2 { margin-top: .5em; font-size: 1em; } header h2 a.button { font-family: inherit; font-size: inherit; border: 1px solid; border-radius: .2em; background: #eee; color: inherit; text-decoration: none; padding: .1em .5em; margin: 1px calc(.1em + 1px); cursor: pointer; border-color: #ccc; } @media (prefers-color-scheme: dark) { header h2 a.button { background: #333; } } @media (prefers-color-scheme: dark) { header h2 a.button { border-color: #444; } } header h2 a.button.current { border: 2px solid; background: #fff; border-color: #999; cursor: default; } @media (prefers-color-scheme: dark) { header h2 a.button.current { background: #1e1e1e; } } @media (prefers-color-scheme: dark) { header h2 a.button.current { border-color: #777; } } header p.text { margin: .5em 0 -.5em; color: #666; font-style: italic; } @media (prefers-color-scheme: dark) { header p.text { color: #aaa; } } header.sticky { position: fixed; left: 0; right: 0; height: 2.5em; } header.sticky .text { display: none; } header.sticky h1, header.sticky h2 { font-size: 1em; margin-top: 0; display: inline-block; } header.sticky .content { padding: 0.5rem 3.5rem; } header.sticky .content p { font-size: 1em; } header.sticky ~ #source { padding-top: 6.5em; } main { position: relative; z-index: 1; } footer { margin: 1rem 3.5rem; } footer .content { padding: 0; color: #666; font-style: italic; } @media (prefers-color-scheme: dark) { footer .content { color: #aaa; } } #index { margin: 1rem 0 0 3.5rem; } h1 { font-size: 1.25em; display: inline-block; } #filter_container { float: right; margin: 0 2em 0 0; line-height: 1.66em; } #filter_container #filter { width: 10em; padding: 0.2em 0.5em; border: 2px solid #ccc; background: #fff; color: #000; } @media (prefers-color-scheme: dark) { #filter_container #filter { border-color: #444; } } @media (prefers-color-scheme: dark) { #filter_container #filter { background: #1e1e1e; } } @media (prefers-color-scheme: dark) { #filter_container #filter { color: #eee; } } #filter_container #filter:focus { border-color: #007acc; } #filter_container :disabled ~ label { color: #ccc; } @media (prefers-color-scheme: dark) { #filter_container :disabled ~ label { color: #444; } } #filter_container label { font-size: .875em; color: #666; } @media (prefers-color-scheme: dark) { #filter_container label { color: #aaa; } } header button { font-family: inherit; font-size: inherit; border: 1px solid; border-radius: .2em; background: #eee; color: inherit; text-decoration: none; padding: .1em .5em; margin: 1px calc(.1em + 1px); cursor: pointer; border-color: #ccc; } @media (prefers-color-scheme: dark) { header button { background: #333; } } @media (prefers-color-scheme: dark) { header button { border-color: #444; } } header button:active, header button:focus { outline: 2px dashed #007acc; } header button.run { background: #eeffee; } @media (prefers-color-scheme: dark) { header button.run { background: #373d29; } } header button.run.show_run { background: #dfd; border: 2px solid #00dd00; margin: 0 .1em; } @media (prefers-color-scheme: dark) { header button.run.show_run { background: #373d29; } } header button.mis { background: #ffeeee; } @media (prefers-color-scheme: dark) { header button.mis { background: #4b1818; } } header button.mis.show_mis { background: #fdd; border: 2px solid #ff0000; margin: 0 .1em; } @media (prefers-color-scheme: dark) { header button.mis.show_mis { background: #4b1818; } } header button.exc { background: #f7f7f7; } @media (prefers-color-scheme: dark) { header button.exc { background: #333; } } header button.exc.show_exc { background: #eee; border: 2px solid #808080; margin: 0 .1em; } @media (prefers-color-scheme: dark) { header button.exc.show_exc { background: #333; } } header button.par { background: #ffffd5; } @media (prefers-color-scheme: dark) { header button.par { background: #650; } } header button.par.show_par { background: #ffa; border: 2px solid #bbbb00; margin: 0 .1em; } @media (prefers-color-scheme: dark) { header button.par.show_par { background: #650; } } #help_panel, #source p .annotate.long { display: none; position: absolute; z-index: 999; background: #ffffcc; border: 1px solid #888; border-radius: .2em; color: #333; padding: .25em .5em; } #source p .annotate.long { white-space: normal; float: right; top: 1.75em; right: 1em; height: auto; } #help_panel_wrapper { float: right; position: relative; } #keyboard_icon { margin: 5px; } #help_panel_state { display: none; } #help_panel { top: 25px; right: 0; padding: .75em; border: 1px solid #883; color: #333; } #help_panel .keyhelp p { margin-top: .75em; } #help_panel .legend { font-style: italic; margin-bottom: 1em; } .indexfile #help_panel { width: 25em; } .pyfile #help_panel { width: 18em; } #help_panel_state:checked ~ #help_panel { display: block; } kbd { border: 1px solid black; border-color: #888 #333 #333 #888; padding: .1em .35em; font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-weight: bold; background: #eee; border-radius: 3px; } #source { padding: 1em 0 1em 3.5rem; font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace; } #source p { position: relative; white-space: pre; } #source p * { box-sizing: border-box; } #source p .n { float: left; text-align: right; width: 3.5rem; box-sizing: border-box; margin-left: -3.5rem; padding-right: 1em; color: #999; user-select: none; } @media (prefers-color-scheme: dark) { #source p .n { color: #777; } } #source p .n.highlight { background: #ffdd00; } #source p .n a { scroll-margin-top: 6em; text-decoration: none; color: #999; } @media (prefers-color-scheme: dark) { #source p .n a { color: #777; } } #source p .n a:hover { text-decoration: underline; color: #999; } @media (prefers-color-scheme: dark) { #source p .n a:hover { color: #777; } } #source p .t { display: inline-block; width: 100%; box-sizing: border-box; margin-left: -.5em; padding-left: 0.3em; border-left: 0.2em solid #fff; } @media (prefers-color-scheme: dark) { #source p .t { border-color: #1e1e1e; } } #source p .t:hover { background: #f2f2f2; } @media (prefers-color-scheme: dark) { #source p .t:hover { background: #282828; } } #source p .t:hover ~ .r .annotate.long { display: block; } #source p .t .com { color: #008000; font-style: italic; line-height: 1px; } @media (prefers-color-scheme: dark) { #source p .t .com { color: #6a9955; } } #source p .t .key { font-weight: bold; line-height: 1px; } #source p .t .str { color: #0451a5; } @media (prefers-color-scheme: dark) { #source p .t .str { color: #9cdcfe; } } #source p.mis .t { border-left: 0.2em solid #ff0000; } #source p.mis.show_mis .t { background: #fdd; } @media (prefers-color-scheme: dark) { #source p.mis.show_mis .t { background: #4b1818; } } #source p.mis.show_mis .t:hover { background: #f2d2d2; } @media (prefers-color-scheme: dark) { #source p.mis.show_mis .t:hover { background: #532323; } } #source p.run .t { border-left: 0.2em solid #00dd00; } #source p.run.show_run .t { background: #dfd; } @media (prefers-color-scheme: dark) { #source p.run.show_run .t { background: #373d29; } } #source p.run.show_run .t:hover { background: #d2f2d2; } @media (prefers-color-scheme: dark) { #source p.run.show_run .t:hover { background: #404633; } } #source p.exc .t { border-left: 0.2em solid #808080; } #source p.exc.show_exc .t { background: #eee; } @media (prefers-color-scheme: dark) { #source p.exc.show_exc .t { background: #333; } } #source p.exc.show_exc .t:hover { background: #e2e2e2; } @media (prefers-color-scheme: dark) { #source p.exc.show_exc .t:hover { background: #3c3c3c; } } #source p.par .t { border-left: 0.2em solid #bbbb00; } #source p.par.show_par .t { background: #ffa; } @media (prefers-color-scheme: dark) { #source p.par.show_par .t { background: #650; } } #source p.par.show_par .t:hover { background: #f2f2a2; } @media (prefers-color-scheme: dark) { #source p.par.show_par .t:hover { background: #6d5d0c; } } #source p .r { position: absolute; top: 0; right: 2.5em; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; } #source p .annotate { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; color: #666; padding-right: .5em; } @media (prefers-color-scheme: dark) { #source p .annotate { color: #ddd; } } #source p .annotate.short:hover ~ .long { display: block; } #source p .annotate.long { width: 30em; right: 2.5em; } #source p input { display: none; } #source p input ~ .r label.ctx { cursor: pointer; border-radius: .25em; } #source p input ~ .r label.ctx::before { content: "▶ "; } #source p input ~ .r label.ctx:hover { background: #e8f4ff; color: #666; } @media (prefers-color-scheme: dark) { #source p input ~ .r label.ctx:hover { background: #0f3a42; } } @media (prefers-color-scheme: dark) { #source p input ~ .r label.ctx:hover { color: #aaa; } } #source p input:checked ~ .r label.ctx { background: #d0e8ff; color: #666; border-radius: .75em .75em 0 0; padding: 0 .5em; margin: -.25em 0; } @media (prefers-color-scheme: dark) { #source p input:checked ~ .r label.ctx { background: #056; } } @media (prefers-color-scheme: dark) { #source p input:checked ~ .r label.ctx { color: #aaa; } } #source p input:checked ~ .r label.ctx::before { content: "▼ "; } #source p input:checked ~ .ctxs { padding: .25em .5em; overflow-y: scroll; max-height: 10.5em; } #source p label.ctx { color: #999; display: inline-block; padding: 0 .5em; font-size: .8333em; } @media (prefers-color-scheme: dark) { #source p label.ctx { color: #777; } } #source p .ctxs { display: block; max-height: 0; overflow-y: hidden; transition: all .2s; padding: 0 .5em; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; white-space: nowrap; background: #d0e8ff; border-radius: .25em; margin-right: 1.75em; text-align: right; } @media (prefers-color-scheme: dark) { #source p .ctxs { background: #056; } } #index { font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 0.875em; } #index table.index { margin-left: -.5em; } #index td, #index th { text-align: right; padding: .25em .5em; border-bottom: 1px solid #eee; } @media (prefers-color-scheme: dark) { #index td, #index th { border-color: #333; } } #index td.name, #index th.name { text-align: left; width: auto; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; min-width: 15em; } #index th { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-style: italic; color: #333; cursor: pointer; } @media (prefers-color-scheme: dark) { #index th { color: #ddd; } } #index th:hover { background: #eee; } @media (prefers-color-scheme: dark) { #index th:hover { background: #333; } } #index th .arrows { color: #666; font-size: 85%; font-family: sans-serif; font-style: normal; pointer-events: none; } #index th[aria-sort="ascending"], #index th[aria-sort="descending"] { white-space: nowrap; background: #eee; padding-left: .5em; } @media (prefers-color-scheme: dark) { #index th[aria-sort="ascending"], #index th[aria-sort="descending"] { background: #333; } } #index th[aria-sort="ascending"] .arrows::after { content: " ▲"; } #index th[aria-sort="descending"] .arrows::after { content: " ▼"; } #index td.name { font-size: 1.15em; } #index td.name a { text-decoration: none; color: inherit; } #index td.name .no-noun { font-style: italic; } #index tr.total td, #index tr.total_dynamic td { font-weight: bold; border-top: 1px solid #ccc; border-bottom: none; } #index tr.region:hover { background: #eee; } @media (prefers-color-scheme: dark) { #index tr.region:hover { background: #333; } } #index tr.region:hover td.name { text-decoration: underline; color: inherit; } #scroll_marker { position: fixed; z-index: 3; right: 0; top: 0; width: 16px; height: 100%; background: #fff; border-left: 1px solid #eee; will-change: transform; } @media (prefers-color-scheme: dark) { #scroll_marker { background: #1e1e1e; } } @media (prefers-color-scheme: dark) { #scroll_marker { border-color: #333; } } #scroll_marker .marker { background: #ccc; position: absolute; min-height: 3px; width: 100%; } @media (prefers-color-scheme: dark) { #scroll_marker .marker { background: #444; } } html/keybd_closed_cb_ce680311.png0000644000175000017500000002145415047037077016661 0ustar jenkinsjenkinsPNG  IHDR '>NzTXtRaw profile type exifxYv;E1Bv~$eQe~>"l@4'AҬ6_r1sI5u5}WG !ϻ?t_8n8oO@5"<=w焽hgYW%_B_x Og7#x疷yw ko|ZBz_pW~Ye>FӇTuP|:W<;3y?=wy={յpiX~Ž˽ޖF>gCB>Iϰ:²m6a&\ݹAXU7eV]O_ Vnr f%?/[RZqfu+r!W" v?(?I\==;$saԚ1w6+;ŏ4* MtDp'[EwY"3+6'Bc1c5SH1_>s9\s+K*SjiU8ƚj6FnݸǞz3ˆ#<u馟L32l.RiWZyUWۤ;λ[Ԭ9aQ9\ߢƭ9?'QbF\D5Sr{5 L2\rg=Zci6tVȾacrun@knQ]w33Χ&gD伭Ta咳x>O)n+=I3#6S/\xxk/ie8GLWJkǚOSz/׾['*hTLɞ[\S.dqG?,OQD颫XͮjN_yIkk14QɈ[)ѳ:aP4SOYf^YKג|jkЈF,״9N36DdA%'[H҃q ]!(z"*IlLu(Ӝ4rfrE!M %23>yȓZRD0s{H0 n.qs;8 |+H2;e hp橀x]M@,1⣩էHJHCz,8йuy2̅8"=n,Q#ۻBN 3?j $64LFa*PrIPQڟv1pMсt!/ 59F# ;#U  PκPtAnrٶ9kn|7k[xp9 2 RIX0ӕ=b,E뮺8V}&-H3ܗ ݶ,C@z%KKߙ_#6+y.yMV[n"6-[z$ka|Ev4 ME^-ʴu e^A߆pi,Ow2Mv MVK=d8' }[I2Oyt"vȩN`@698 =LʰȲ$@.K&{;wاkv;tR *fһ4K>r4񻮿pXutcW$x[X\)𕇀gɎmt'cE43D72,.a D/GR\Wm>@C/WD*ќRT-|_1 (><4qӥAW5= 1Q5h N8CPq7^ywl}Uw +Rc(1x2 %dV&7 `ip+TUq ́-l/X N{A/+$!⹾# &捈Cd}Gn!m!TQW e!D=85Snv>ioK+}_Dz4n~sT7Cc<"( C5:>t%HOp=rqgP"lY( 3OXs2ofC7Y0UW Iy DTh_KaZB k5skh=Ku-AK{.%-"Nc7L*1Y'Z(5_UXmvg:FfEq%ҠWhA`vFa7HMМn~t)տ stAF: IJ.ӌlIm]ځe﷌l@IAx69!e9?E^w&f1"}Aؒ"Qῷ܆+9Dލe<ͯ~1W6EBQiXTJ,m 93F$UG8BӲ{h$S-/~TTO-[r+`<#nf{67o%㉳eVբLz7[HYiKuԳu^.$u r"QA%sV)xT~=mޟo- #\Nɐg)S$]HrZ@1S&ҭ @7>p 8^Gc?!"٪-1y$N lϘ֖'2%9FO_BM>-aaKŮ,e]`l%jCJР,XO`cRwCV2NgnGxsp 4.fBB֨/=T]wJvW@ޙ~j+öN f|Zv/I>?ҹ[X -VqKɬ;OoHh}ŮnovMB+D5 5%ϲ<[a~)߭i8D*{.yq4<;]Eƫޞr`ͮk}nj=nr,~MHUȓHvTH>*-h z!*5"9!!rT tIo=]/>{3HY1JʓQjGI jF d#AUec`<iOk182#DE7ї 9uyEg#F#*9 gj ˗ Zx,hQYOYAsVrOTe^bUޖg@Ű]LK 0)LN=uJn l9B[ʙF.HGBT y"@RE+'9y&pA!4NǺ,*ìcmfK4(Nf1հ'%|̒oF?G2{_C̫[W 2oe^%IA̟K]a Ϊ, jͩa%gXZv57~`PrtiTXtXML:com.adobe.xmp bKGD̿ pHYs  tIME'cOIDAT(cd@$`a R-#C:C:3D)vabqLt$De pKB+0"k%IENDB`html/.gitignore0000644000175000017500000000003315047037077013704 0ustar jenkinsjenkins# Created by coverage.py * html/coverage_html_cb_497bf287.js0000644000175000017500000006313715047037077016727 0ustar jenkinsjenkins// Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 // For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt // Coverage.py HTML report browser code. /*jslint browser: true, sloppy: true, vars: true, plusplus: true, maxerr: 50, indent: 4 */ /*global coverage: true, document, window, $ */ coverage = {}; // General helpers function debounce(callback, wait) { let timeoutId = null; return function(...args) { clearTimeout(timeoutId); timeoutId = setTimeout(() => { callback.apply(this, args); }, wait); }; }; function checkVisible(element) { const rect = element.getBoundingClientRect(); const viewBottom = Math.max(document.documentElement.clientHeight, window.innerHeight); const viewTop = 30; return !(rect.bottom < viewTop || rect.top >= viewBottom); } function on_click(sel, fn) { const elt = document.querySelector(sel); if (elt) { elt.addEventListener("click", fn); } } // Helpers for table sorting function getCellValue(row, column = 0) { const cell = row.cells[column] // nosemgrep: eslint.detect-object-injection if (cell.childElementCount == 1) { var child = cell.firstElementChild; if (child.tagName === "A") { child = child.firstElementChild; } if (child instanceof HTMLDataElement && child.value) { return child.value; } } return cell.innerText || cell.textContent; } function rowComparator(rowA, rowB, column = 0) { let valueA = getCellValue(rowA, column); let valueB = getCellValue(rowB, column); if (!isNaN(valueA) && !isNaN(valueB)) { return valueA - valueB; } return valueA.localeCompare(valueB, undefined, {numeric: true}); } function sortColumn(th) { // Get the current sorting direction of the selected header, // clear state on other headers and then set the new sorting direction. const currentSortOrder = th.getAttribute("aria-sort"); [...th.parentElement.cells].forEach(header => header.setAttribute("aria-sort", "none")); var direction; if (currentSortOrder === "none") { direction = th.dataset.defaultSortOrder || "ascending"; } else if (currentSortOrder === "ascending") { direction = "descending"; } else { direction = "ascending"; } th.setAttribute("aria-sort", direction); const column = [...th.parentElement.cells].indexOf(th) // Sort all rows and afterwards append them in order to move them in the DOM. Array.from(th.closest("table").querySelectorAll("tbody tr")) .sort((rowA, rowB) => rowComparator(rowA, rowB, column) * (direction === "ascending" ? 1 : -1)) .forEach(tr => tr.parentElement.appendChild(tr)); // Save the sort order for next time. if (th.id !== "region") { let th_id = "file"; // Sort by file if we don't have a column id let current_direction = direction; const stored_list = localStorage.getItem(coverage.INDEX_SORT_STORAGE); if (stored_list) { ({th_id, direction} = JSON.parse(stored_list)) } localStorage.setItem(coverage.INDEX_SORT_STORAGE, JSON.stringify({ "th_id": th.id, "direction": current_direction })); if (th.id !== th_id || document.getElementById("region")) { // Sort column has changed, unset sorting by function or class. localStorage.setItem(coverage.SORTED_BY_REGION, JSON.stringify({ "by_region": false, "region_direction": current_direction })); } } else { // Sort column has changed to by function or class, remember that. localStorage.setItem(coverage.SORTED_BY_REGION, JSON.stringify({ "by_region": true, "region_direction": direction })); } } // Find all the elements with data-shortcut attribute, and use them to assign a shortcut key. coverage.assign_shortkeys = function () { document.querySelectorAll("[data-shortcut]").forEach(element => { document.addEventListener("keypress", event => { if (event.target.tagName.toLowerCase() === "input") { return; // ignore keypress from search filter } if (event.key === element.dataset.shortcut) { element.click(); } }); }); }; // Create the events for the filter box. coverage.wire_up_filter = function () { // Populate the filter and hide100 inputs if there are saved values for them. const saved_filter_value = localStorage.getItem(coverage.FILTER_STORAGE); if (saved_filter_value) { document.getElementById("filter").value = saved_filter_value; } const saved_hide100_value = localStorage.getItem(coverage.HIDE100_STORAGE); if (saved_hide100_value) { document.getElementById("hide100").checked = JSON.parse(saved_hide100_value); } // Cache elements. const table = document.querySelector("table.index"); const table_body_rows = table.querySelectorAll("tbody tr"); const no_rows = document.getElementById("no_rows"); // Observe filter keyevents. const filter_handler = (event => { // Keep running total of each metric, first index contains number of shown rows const totals = new Array(table.rows[0].cells.length).fill(0); // Accumulate the percentage as fraction totals[totals.length - 1] = { "numer": 0, "denom": 0 }; // nosemgrep: eslint.detect-object-injection var text = document.getElementById("filter").value; // Store filter value localStorage.setItem(coverage.FILTER_STORAGE, text); const casefold = (text === text.toLowerCase()); const hide100 = document.getElementById("hide100").checked; // Store hide value. localStorage.setItem(coverage.HIDE100_STORAGE, JSON.stringify(hide100)); // Hide / show elements. table_body_rows.forEach(row => { var show = false; // Check the text filter. for (let column = 0; column < totals.length; column++) { cell = row.cells[column]; if (cell.classList.contains("name")) { var celltext = cell.textContent; if (casefold) { celltext = celltext.toLowerCase(); } if (celltext.includes(text)) { show = true; } } } // Check the "hide covered" filter. if (show && hide100) { const [numer, denom] = row.cells[row.cells.length - 1].dataset.ratio.split(" "); show = (numer !== denom); } if (!show) { // hide row.classList.add("hidden"); return; } // show row.classList.remove("hidden"); totals[0]++; for (let column = 0; column < totals.length; column++) { // Accumulate dynamic totals cell = row.cells[column] // nosemgrep: eslint.detect-object-injection if (cell.classList.contains("name")) { continue; } if (column === totals.length - 1) { // Last column contains percentage const [numer, denom] = cell.dataset.ratio.split(" "); totals[column]["numer"] += parseInt(numer, 10); // nosemgrep: eslint.detect-object-injection totals[column]["denom"] += parseInt(denom, 10); // nosemgrep: eslint.detect-object-injection } else { totals[column] += parseInt(cell.textContent, 10); // nosemgrep: eslint.detect-object-injection } } }); // Show placeholder if no rows will be displayed. if (!totals[0]) { // Show placeholder, hide table. no_rows.style.display = "block"; table.style.display = "none"; return; } // Hide placeholder, show table. no_rows.style.display = null; table.style.display = null; const footer = table.tFoot.rows[0]; // Calculate new dynamic sum values based on visible rows. for (let column = 0; column < totals.length; column++) { // Get footer cell element. const cell = footer.cells[column]; // nosemgrep: eslint.detect-object-injection if (cell.classList.contains("name")) { continue; } // Set value into dynamic footer cell element. if (column === totals.length - 1) { // Percentage column uses the numerator and denominator, // and adapts to the number of decimal places. const match = /\.([0-9]+)/.exec(cell.textContent); const places = match ? match[1].length : 0; const { numer, denom } = totals[column]; // nosemgrep: eslint.detect-object-injection cell.dataset.ratio = `${numer} ${denom}`; // Check denom to prevent NaN if filtered files contain no statements cell.textContent = denom ? `${(numer * 100 / denom).toFixed(places)}%` : `${(100).toFixed(places)}%`; } else { cell.textContent = totals[column]; // nosemgrep: eslint.detect-object-injection } } }); document.getElementById("filter").addEventListener("input", debounce(filter_handler)); document.getElementById("hide100").addEventListener("input", debounce(filter_handler)); // Trigger change event on setup, to force filter on page refresh // (filter value may still be present). document.getElementById("filter").dispatchEvent(new Event("input")); document.getElementById("hide100").dispatchEvent(new Event("input")); }; coverage.FILTER_STORAGE = "COVERAGE_FILTER_VALUE"; coverage.HIDE100_STORAGE = "COVERAGE_HIDE100_VALUE"; // Set up the click-to-sort columns. coverage.wire_up_sorting = function () { document.querySelectorAll("[data-sortable] th[aria-sort]").forEach( th => th.addEventListener("click", e => sortColumn(e.target)) ); // Look for a localStorage item containing previous sort settings: let th_id = "file", direction = "ascending"; const stored_list = localStorage.getItem(coverage.INDEX_SORT_STORAGE); if (stored_list) { ({th_id, direction} = JSON.parse(stored_list)); } let by_region = false, region_direction = "ascending"; const sorted_by_region = localStorage.getItem(coverage.SORTED_BY_REGION); if (sorted_by_region) { ({ by_region, region_direction } = JSON.parse(sorted_by_region)); } const region_id = "region"; if (by_region && document.getElementById(region_id)) { direction = region_direction; } // If we are in a page that has a column with id of "region", sort on // it if the last sort was by function or class. let th; if (document.getElementById(region_id)) { th = document.getElementById(by_region ? region_id : th_id); } else { th = document.getElementById(th_id); } th.setAttribute("aria-sort", direction === "ascending" ? "descending" : "ascending"); th.click() }; coverage.INDEX_SORT_STORAGE = "COVERAGE_INDEX_SORT_2"; coverage.SORTED_BY_REGION = "COVERAGE_SORT_REGION"; // Loaded on index.html coverage.index_ready = function () { coverage.assign_shortkeys(); coverage.wire_up_filter(); coverage.wire_up_sorting(); on_click(".button_prev_file", coverage.to_prev_file); on_click(".button_next_file", coverage.to_next_file); on_click(".button_show_hide_help", coverage.show_hide_help); }; // -- pyfile stuff -- coverage.LINE_FILTERS_STORAGE = "COVERAGE_LINE_FILTERS"; coverage.pyfile_ready = function () { // If we're directed to a particular line number, highlight the line. var frag = location.hash; if (frag.length > 2 && frag[1] === "t") { document.querySelector(frag).closest(".n").classList.add("highlight"); coverage.set_sel(parseInt(frag.substr(2), 10)); } else { coverage.set_sel(0); } on_click(".button_toggle_run", coverage.toggle_lines); on_click(".button_toggle_mis", coverage.toggle_lines); on_click(".button_toggle_exc", coverage.toggle_lines); on_click(".button_toggle_par", coverage.toggle_lines); on_click(".button_next_chunk", coverage.to_next_chunk_nicely); on_click(".button_prev_chunk", coverage.to_prev_chunk_nicely); on_click(".button_top_of_page", coverage.to_top); on_click(".button_first_chunk", coverage.to_first_chunk); on_click(".button_prev_file", coverage.to_prev_file); on_click(".button_next_file", coverage.to_next_file); on_click(".button_to_index", coverage.to_index); on_click(".button_show_hide_help", coverage.show_hide_help); coverage.filters = undefined; try { coverage.filters = localStorage.getItem(coverage.LINE_FILTERS_STORAGE); } catch(err) {} if (coverage.filters) { coverage.filters = JSON.parse(coverage.filters); } else { coverage.filters = {run: false, exc: true, mis: true, par: true}; } for (cls in coverage.filters) { coverage.set_line_visibilty(cls, coverage.filters[cls]); // nosemgrep: eslint.detect-object-injection } coverage.assign_shortkeys(); coverage.init_scroll_markers(); coverage.wire_up_sticky_header(); document.querySelectorAll("[id^=ctxs]").forEach( cbox => cbox.addEventListener("click", coverage.expand_contexts) ); // Rebuild scroll markers when the window height changes. window.addEventListener("resize", coverage.build_scroll_markers); }; coverage.toggle_lines = function (event) { const btn = event.target.closest("button"); const category = btn.value const show = !btn.classList.contains("show_" + category); coverage.set_line_visibilty(category, show); coverage.build_scroll_markers(); coverage.filters[category] = show; try { localStorage.setItem(coverage.LINE_FILTERS_STORAGE, JSON.stringify(coverage.filters)); } catch(err) {} }; coverage.set_line_visibilty = function (category, should_show) { const cls = "show_" + category; const btn = document.querySelector(".button_toggle_" + category); if (btn) { if (should_show) { document.querySelectorAll("#source ." + category).forEach(e => e.classList.add(cls)); btn.classList.add(cls); } else { document.querySelectorAll("#source ." + category).forEach(e => e.classList.remove(cls)); btn.classList.remove(cls); } } }; // Return the nth line div. coverage.line_elt = function (n) { return document.getElementById("t" + n)?.closest("p"); }; // Set the selection. b and e are line numbers. coverage.set_sel = function (b, e) { // The first line selected. coverage.sel_begin = b; // The next line not selected. coverage.sel_end = (e === undefined) ? b+1 : e; }; coverage.to_top = function () { coverage.set_sel(0, 1); coverage.scroll_window(0); }; coverage.to_first_chunk = function () { coverage.set_sel(0, 1); coverage.to_next_chunk(); }; coverage.to_prev_file = function () { window.location = document.getElementById("prevFileLink").href; } coverage.to_next_file = function () { window.location = document.getElementById("nextFileLink").href; } coverage.to_index = function () { location.href = document.getElementById("indexLink").href; } coverage.show_hide_help = function () { const helpCheck = document.getElementById("help_panel_state") helpCheck.checked = !helpCheck.checked; } // Return a string indicating what kind of chunk this line belongs to, // or null if not a chunk. coverage.chunk_indicator = function (line_elt) { const classes = line_elt?.className; if (!classes) { return null; } const match = classes.match(/\bshow_\w+\b/); if (!match) { return null; } return match[0]; }; coverage.to_next_chunk = function () { const c = coverage; // Find the start of the next colored chunk. var probe = c.sel_end; var chunk_indicator, probe_line; while (true) { probe_line = c.line_elt(probe); if (!probe_line) { return; } chunk_indicator = c.chunk_indicator(probe_line); if (chunk_indicator) { break; } probe++; } // There's a next chunk, `probe` points to it. var begin = probe; // Find the end of this chunk. var next_indicator = chunk_indicator; while (next_indicator === chunk_indicator) { probe++; probe_line = c.line_elt(probe); next_indicator = c.chunk_indicator(probe_line); } c.set_sel(begin, probe); c.show_selection(); }; coverage.to_prev_chunk = function () { const c = coverage; // Find the end of the prev colored chunk. var probe = c.sel_begin-1; var probe_line = c.line_elt(probe); if (!probe_line) { return; } var chunk_indicator = c.chunk_indicator(probe_line); while (probe > 1 && !chunk_indicator) { probe--; probe_line = c.line_elt(probe); if (!probe_line) { return; } chunk_indicator = c.chunk_indicator(probe_line); } // There's a prev chunk, `probe` points to its last line. var end = probe+1; // Find the beginning of this chunk. var prev_indicator = chunk_indicator; while (prev_indicator === chunk_indicator) { probe--; if (probe <= 0) { return; } probe_line = c.line_elt(probe); prev_indicator = c.chunk_indicator(probe_line); } c.set_sel(probe+1, end); c.show_selection(); }; // Returns 0, 1, or 2: how many of the two ends of the selection are on // the screen right now? coverage.selection_ends_on_screen = function () { if (coverage.sel_begin === 0) { return 0; } const begin = coverage.line_elt(coverage.sel_begin); const end = coverage.line_elt(coverage.sel_end-1); return ( (checkVisible(begin) ? 1 : 0) + (checkVisible(end) ? 1 : 0) ); }; coverage.to_next_chunk_nicely = function () { if (coverage.selection_ends_on_screen() === 0) { // The selection is entirely off the screen: // Set the top line on the screen as selection. // This will select the top-left of the viewport // As this is most likely the span with the line number we take the parent const line = document.elementFromPoint(0, 0).parentElement; if (line.parentElement !== document.getElementById("source")) { // The element is not a source line but the header or similar coverage.select_line_or_chunk(1); } else { // We extract the line number from the id coverage.select_line_or_chunk(parseInt(line.id.substring(1), 10)); } } coverage.to_next_chunk(); }; coverage.to_prev_chunk_nicely = function () { if (coverage.selection_ends_on_screen() === 0) { // The selection is entirely off the screen: // Set the lowest line on the screen as selection. // This will select the bottom-left of the viewport // As this is most likely the span with the line number we take the parent const line = document.elementFromPoint(document.documentElement.clientHeight-1, 0).parentElement; if (line.parentElement !== document.getElementById("source")) { // The element is not a source line but the header or similar coverage.select_line_or_chunk(coverage.lines_len); } else { // We extract the line number from the id coverage.select_line_or_chunk(parseInt(line.id.substring(1), 10)); } } coverage.to_prev_chunk(); }; // Select line number lineno, or if it is in a colored chunk, select the // entire chunk coverage.select_line_or_chunk = function (lineno) { var c = coverage; var probe_line = c.line_elt(lineno); if (!probe_line) { return; } var the_indicator = c.chunk_indicator(probe_line); if (the_indicator) { // The line is in a highlighted chunk. // Search backward for the first line. var probe = lineno; var indicator = the_indicator; while (probe > 0 && indicator === the_indicator) { probe--; probe_line = c.line_elt(probe); if (!probe_line) { break; } indicator = c.chunk_indicator(probe_line); } var begin = probe + 1; // Search forward for the last line. probe = lineno; indicator = the_indicator; while (indicator === the_indicator) { probe++; probe_line = c.line_elt(probe); indicator = c.chunk_indicator(probe_line); } coverage.set_sel(begin, probe); } else { coverage.set_sel(lineno); } }; coverage.show_selection = function () { // Highlight the lines in the chunk document.querySelectorAll("#source .highlight").forEach(e => e.classList.remove("highlight")); for (let probe = coverage.sel_begin; probe < coverage.sel_end; probe++) { coverage.line_elt(probe).querySelector(".n").classList.add("highlight"); } coverage.scroll_to_selection(); }; coverage.scroll_to_selection = function () { // Scroll the page if the chunk isn't fully visible. if (coverage.selection_ends_on_screen() < 2) { const element = coverage.line_elt(coverage.sel_begin); coverage.scroll_window(element.offsetTop - 60); } }; coverage.scroll_window = function (to_pos) { window.scroll({top: to_pos, behavior: "smooth"}); }; coverage.init_scroll_markers = function () { // Init some variables coverage.lines_len = document.querySelectorAll("#source > p").length; // Build html coverage.build_scroll_markers(); }; coverage.build_scroll_markers = function () { const temp_scroll_marker = document.getElementById("scroll_marker") if (temp_scroll_marker) temp_scroll_marker.remove(); // Don't build markers if the window has no scroll bar. if (document.body.scrollHeight <= window.innerHeight) { return; } const marker_scale = window.innerHeight / document.body.scrollHeight; const line_height = Math.min(Math.max(3, window.innerHeight / coverage.lines_len), 10); let previous_line = -99, last_mark, last_top; const scroll_marker = document.createElement("div"); scroll_marker.id = "scroll_marker"; document.getElementById("source").querySelectorAll( "p.show_run, p.show_mis, p.show_exc, p.show_exc, p.show_par" ).forEach(element => { const line_top = Math.floor(element.offsetTop * marker_scale); const line_number = parseInt(element.querySelector(".n a").id.substr(1)); if (line_number === previous_line + 1) { // If this solid missed block just make previous mark higher. last_mark.style.height = `${line_top + line_height - last_top}px`; } else { // Add colored line in scroll_marker block. last_mark = document.createElement("div"); last_mark.id = `m${line_number}`; last_mark.classList.add("marker"); last_mark.style.height = `${line_height}px`; last_mark.style.top = `${line_top}px`; scroll_marker.append(last_mark); last_top = line_top; } previous_line = line_number; }); // Append last to prevent layout calculation document.body.append(scroll_marker); }; coverage.wire_up_sticky_header = function () { const header = document.querySelector("header"); const header_bottom = ( header.querySelector(".content h2").getBoundingClientRect().top - header.getBoundingClientRect().top ); function updateHeader() { if (window.scrollY > header_bottom) { header.classList.add("sticky"); } else { header.classList.remove("sticky"); } } window.addEventListener("scroll", updateHeader); updateHeader(); }; coverage.expand_contexts = function (e) { var ctxs = e.target.parentNode.querySelector(".ctxs"); if (!ctxs.classList.contains("expanded")) { var ctxs_text = ctxs.textContent; var width = Number(ctxs_text[0]); ctxs.textContent = ""; for (var i = 1; i < ctxs_text.length; i += width) { key = ctxs_text.substring(i, i + width).trim(); ctxs.appendChild(document.createTextNode(contexts[key])); ctxs.appendChild(document.createElement("br")); } ctxs.classList.add("expanded"); } }; document.addEventListener("DOMContentLoaded", () => { if (document.body.classList.contains("indexfile")) { coverage.index_ready(); } else { coverage.pyfile_ready(); } }); html/z_9559bdfa8243b1b0___init___py.html0000644000175000017500000001147015047037077017707 0ustar jenkinsjenkins Coverage for /home/jenkins/mindspore/testcases/testcases/tests/st/networks/__init__.py: 100%

Coverage for /home/jenkins/mindspore/testcases/testcases/tests/st/networks/__init__.py: 100%

0 statements  

« prev     ^ index     » next       coverage.py v7.5.4a0.dev2, created at 2025-08-13 15:26 +0800

html/z_7eb9929a84352c92___init___py.html0000644000175000017500000001735615047037077017601 0ustar jenkinsjenkins Coverage for /home/jenkins/mindspore/testcases/testcases/tests/st/networks/large_models/resume/__init__.py: 100%

Coverage for /home/jenkins/mindspore/testcases/testcases/tests/st/networks/large_models/resume/__init__.py: 100%

0 statements  

« prev     ^ index     » next       coverage.py v7.5.4a0.dev2, created at 2025-08-13 15:26 +0800

1# Copyright 2025 Huawei Technologies Co., Ltd 

2# 

3# Licensed under the Apache License, Version 2.0 (the "License"); 

4# you may not use this file except in compliance with the License. 

5# You may obtain a copy of the License at 

6# 

7# http://www.apache.org/licenses/LICENSE-2.0 

8# 

9# Unless required by applicable law or agreed to in writing, software 

10# distributed under the License is distributed on an "AS IS" BASIS, 

11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 

12# See the License for the specific language governing permissions and 

13# limitations under the License. 

14# ============================================================================ 

15"""Test resume.""" 

html/index.html0000644000175000017500000002325515047037337013723 0ustar jenkinsjenkins Coverage report

Coverage report: 65% 54% 36%

Files Functions Classes

coverage.py v7.5.4a0.dev2, created at 2025-08-13 15:26 +0800

File statements missing excluded branches partial coverage
/home/jenkins/mindspore/testcases/testcases/tests/__init__.py 0 0 0 0 0 100%
/home/jenkins/mindspore/testcases/testcases/tests/mark_utils.py 24 4 0 10 4 76%
/home/jenkins/mindspore/testcases/testcases/tests/st/__init__.py 0 0 0 0 0 100%
/home/jenkins/mindspore/testcases/testcases/tests/st/auto_parallel/__init__.py 0 0 0 0 0 100%
/home/jenkins/mindspore/testcases/testcases/tests/st/auto_parallel/test_auto_parallel_train.py 10 2 0 0 0 80%
/home/jenkins/mindspore/testcases/testcases/tests/st/common/__init__.py 0 0 0 0 0 100%
/home/jenkins/mindspore/testcases/testcases/tests/st/common/random_generator.py 32 21 0 10 0 26%
/home/jenkins/mindspore/testcases/testcases/tests/st/networks/__init__.py 0 0 0 0 0 100%
/home/jenkins/mindspore/testcases/testcases/tests/st/networks/large_models/__init__.py 0 0 0 0 0 100%
/home/jenkins/mindspore/testcases/testcases/tests/st/networks/large_models/resume/__init__.py 0 0 0 0 0 100%
/home/jenkins/mindspore/testcases/testcases/tests/st/networks/large_models/resume/resume_train_utils.py 14 1 0 4 0 94%
/home/jenkins/mindspore/testcases/testcases/tests/st/networks/large_models/resume/test_parallel_resume.py 28 4 0 6 2 82%
Total 108 32 0 30 6 65%

No items found using the specified filter.

html/status.json0000644000175000017500000001156315047037077014144 0ustar jenkinsjenkins{"note":"This file is an internal implementation detail to speed up HTML report generation. Its format can change at any time. You might be looking for the JSON report: https://coverage.rtfd.io/cmd.html#cmd-json","format":5,"version":"7.5.4a0.dev2","globals":"e17a731ea9ee35d32c41aaef2e73716e","files":{"z_488ba468c84a2858___init___py":{"hash":"175e3bf678676fc912361fb3b5bc0240","index":{"url":"z_488ba468c84a2858___init___py.html","file":"/home/jenkins/mindspore/testcases/testcases/tests/__init__.py","description":"","nums":{"precision":0,"n_files":1,"n_statements":0,"n_excluded":0,"n_missing":0,"n_branches":0,"n_partial_branches":0,"n_missing_branches":0}}},"z_488ba468c84a2858_mark_utils_py":{"hash":"c3521193887bb43256d5b58eae53b7bf","index":{"url":"z_488ba468c84a2858_mark_utils_py.html","file":"/home/jenkins/mindspore/testcases/testcases/tests/mark_utils.py","description":"","nums":{"precision":0,"n_files":1,"n_statements":24,"n_excluded":0,"n_missing":4,"n_branches":10,"n_partial_branches":4,"n_missing_branches":4}}},"z_c16fa8bbbad45d91___init___py":{"hash":"175e3bf678676fc912361fb3b5bc0240","index":{"url":"z_c16fa8bbbad45d91___init___py.html","file":"/home/jenkins/mindspore/testcases/testcases/tests/st/__init__.py","description":"","nums":{"precision":0,"n_files":1,"n_statements":0,"n_excluded":0,"n_missing":0,"n_branches":0,"n_partial_branches":0,"n_missing_branches":0}}},"z_08cf99c50893ba22___init___py":{"hash":"175e3bf678676fc912361fb3b5bc0240","index":{"url":"z_08cf99c50893ba22___init___py.html","file":"/home/jenkins/mindspore/testcases/testcases/tests/st/auto_parallel/__init__.py","description":"","nums":{"precision":0,"n_files":1,"n_statements":0,"n_excluded":0,"n_missing":0,"n_branches":0,"n_partial_branches":0,"n_missing_branches":0}}},"z_08cf99c50893ba22_test_auto_parallel_train_py":{"hash":"24d9caa45d68b2d78abc4cacf60fd62f","index":{"url":"z_08cf99c50893ba22_test_auto_parallel_train_py.html","file":"/home/jenkins/mindspore/testcases/testcases/tests/st/auto_parallel/test_auto_parallel_train.py","description":"","nums":{"precision":0,"n_files":1,"n_statements":10,"n_excluded":0,"n_missing":2,"n_branches":0,"n_partial_branches":0,"n_missing_branches":0}}},"z_6beee35d4c9fca87___init___py":{"hash":"175e3bf678676fc912361fb3b5bc0240","index":{"url":"z_6beee35d4c9fca87___init___py.html","file":"/home/jenkins/mindspore/testcases/testcases/tests/st/common/__init__.py","description":"","nums":{"precision":0,"n_files":1,"n_statements":0,"n_excluded":0,"n_missing":0,"n_branches":0,"n_partial_branches":0,"n_missing_branches":0}}},"z_6beee35d4c9fca87_random_generator_py":{"hash":"d23da305777d13f8506801fa8af37058","index":{"url":"z_6beee35d4c9fca87_random_generator_py.html","file":"/home/jenkins/mindspore/testcases/testcases/tests/st/common/random_generator.py","description":"","nums":{"precision":0,"n_files":1,"n_statements":32,"n_excluded":0,"n_missing":21,"n_branches":10,"n_partial_branches":0,"n_missing_branches":10}}},"z_9559bdfa8243b1b0___init___py":{"hash":"175e3bf678676fc912361fb3b5bc0240","index":{"url":"z_9559bdfa8243b1b0___init___py.html","file":"/home/jenkins/mindspore/testcases/testcases/tests/st/networks/__init__.py","description":"","nums":{"precision":0,"n_files":1,"n_statements":0,"n_excluded":0,"n_missing":0,"n_branches":0,"n_partial_branches":0,"n_missing_branches":0}}},"z_eb25ece5c67c0bc7___init___py":{"hash":"175e3bf678676fc912361fb3b5bc0240","index":{"url":"z_eb25ece5c67c0bc7___init___py.html","file":"/home/jenkins/mindspore/testcases/testcases/tests/st/networks/large_models/__init__.py","description":"","nums":{"precision":0,"n_files":1,"n_statements":0,"n_excluded":0,"n_missing":0,"n_branches":0,"n_partial_branches":0,"n_missing_branches":0}}},"z_7eb9929a84352c92___init___py":{"hash":"d22b4ad789607ee32b4581e21957430d","index":{"url":"z_7eb9929a84352c92___init___py.html","file":"/home/jenkins/mindspore/testcases/testcases/tests/st/networks/large_models/resume/__init__.py","description":"","nums":{"precision":0,"n_files":1,"n_statements":0,"n_excluded":0,"n_missing":0,"n_branches":0,"n_partial_branches":0,"n_missing_branches":0}}},"z_7eb9929a84352c92_resume_train_utils_py":{"hash":"b981c518235c010bc845c97314d0902e","index":{"url":"z_7eb9929a84352c92_resume_train_utils_py.html","file":"/home/jenkins/mindspore/testcases/testcases/tests/st/networks/large_models/resume/resume_train_utils.py","description":"","nums":{"precision":0,"n_files":1,"n_statements":14,"n_excluded":0,"n_missing":1,"n_branches":4,"n_partial_branches":0,"n_missing_branches":0}}},"z_7eb9929a84352c92_test_parallel_resume_py":{"hash":"5c9a2183ce3674ad6d8d4c0c8c2d3170","index":{"url":"z_7eb9929a84352c92_test_parallel_resume_py.html","file":"/home/jenkins/mindspore/testcases/testcases/tests/st/networks/large_models/resume/test_parallel_resume.py","description":"","nums":{"precision":0,"n_files":1,"n_statements":28,"n_excluded":0,"n_missing":4,"n_branches":6,"n_partial_branches":2,"n_missing_branches":2}}}}}html/class_index.html0000644000175000017500000003031115047037077015100 0ustar jenkinsjenkins Coverage report

Coverage report: 96%

Files Functions Classes

coverage.py v7.5.4a0.dev2, created at 2025-08-13 15:26 +0800

File class statements missing excluded branches partial coverage
/home/jenkins/mindspore/testcases/testcases/tests/__init__.py (no class) 0 0 0 0 0 100%
/home/jenkins/mindspore/testcases/testcases/tests/mark_utils.py (no class) 3 0 0 0 0 100%
/home/jenkins/mindspore/testcases/testcases/tests/st/__init__.py (no class) 0 0 0 0 0 100%
/home/jenkins/mindspore/testcases/testcases/tests/st/auto_parallel/__init__.py (no class) 0 0 0 0 0 100%
/home/jenkins/mindspore/testcases/testcases/tests/st/auto_parallel/test_auto_parallel_train.py (no class) 6 0 0 0 0 100%
/home/jenkins/mindspore/testcases/testcases/tests/st/common/__init__.py (no class) 0 0 0 0 0 100%
/home/jenkins/mindspore/testcases/testcases/tests/st/common/random_generator.py (no class) 9 0 0 0 0 100%
/home/jenkins/mindspore/testcases/testcases/tests/st/networks/__init__.py (no class) 0 0 0 0 0 100%
/home/jenkins/mindspore/testcases/testcases/tests/st/networks/large_models/__init__.py (no class) 0 0 0 0 0 100%
/home/jenkins/mindspore/testcases/testcases/tests/st/networks/large_models/resume/__init__.py (no class) 0 0 0 0 0 100%
/home/jenkins/mindspore/testcases/testcases/tests/st/networks/large_models/resume/resume_train_utils.py (no class) 4 0 0 0 0 100%
/home/jenkins/mindspore/testcases/testcases/tests/st/networks/large_models/resume/test_parallel_resume.py TestResumeTraining 13 1 0 4 1 88%
/home/jenkins/mindspore/testcases/testcases/tests/st/networks/large_models/resume/test_parallel_resume.py (no class) 8 0 0 0 0 100%
Total   43 1 0 4 1 96%

No items found using the specified filter.

html/z_488ba468c84a2858_mark_utils_py.html0000644000175000017500000004435715047037077020215 0ustar jenkinsjenkins Coverage for /home/jenkins/mindspore/testcases/testcases/tests/mark_utils.py: 76%

Coverage for /home/jenkins/mindspore/testcases/testcases/tests/mark_utils.py: 76%

24 statements  

« prev     ^ index     » next       coverage.py v7.5.4a0.dev2, created at 2025-08-13 15:26 +0800

1# Copyright 2024 Huawei Technologies Co., Ltd 

2# 

3# Licensed under the Apache License, Version 2.0 (the "License"); 

4# you may not use this file except in compliance with the License. 

5# You may obtain a copy of the License at 

6# 

7# http://www.apache.org/licenses/LICENSE-2.0 

8# 

9# Unless required by applicable law or agreed to in writing, software 

10# distributed under the License is distributed on an "AS IS" BASIS, 

11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 

12# See the License for the specific language governing permissions and 

13# limitations under the License. 

14# ============================================================================ 

15 

16""" define marks """ 

17import pytest 

18from tests.st.common.random_generator import set_numpy_global_seed 

19 

20 

21def arg_mark(plat_marks, level_mark, card_mark, essential_mark): 

22 optional_plat_marks = ['platform_ascend', 'platform_ascend910b', 'platform_ascend310p', 'platform_gpu', 

23 'cpu_linux', 'cpu_windows', 'cpu_macos'] 

24 optional_level_marks = ['level0', 'level1', 'level2', 'level3', 'level4'] 

25 optional_card_marks = ['onecard', 'allcards', 'dryrun', 'dryrun_only'] 

26 optional_essential_marks = ['essential', 'unessential'] 

27 if not plat_marks or not set(plat_marks).issubset(set(optional_plat_marks)): 27 ↛ 28line 27 didn't jump to line 28 because the condition on line 27 was never true

28 raise ValueError("wrong plat_marks values") 

29 if level_mark not in optional_level_marks: 29 ↛ 30line 29 didn't jump to line 30 because the condition on line 29 was never true

30 raise ValueError("wrong level_mark value") 

31 if card_mark not in optional_card_marks: 31 ↛ 32line 31 didn't jump to line 32 because the condition on line 31 was never true

32 raise ValueError("wrong card_mark value") 

33 if essential_mark not in optional_essential_marks: 33 ↛ 34line 33 didn't jump to line 34 because the condition on line 33 was never true

34 raise ValueError("wrong essential_mark value") 

35 

36 def decorator(func): 

37 for plat_mark in plat_marks: 

38 func = getattr(pytest.mark, plat_mark)(func) 

39 func = getattr(pytest.mark, level_mark)(func) 

40 func = getattr(pytest.mark, card_mark)(func) 

41 func = getattr(pytest.mark, essential_mark)(func) 

42 set_numpy_global_seed() 

43 return func 

44 

45 return decorator 

html/favicon_32_cb_58284776.png0000644000175000017500000000330415047037077016041 0ustar jenkinsjenkinsPNG  IHDR DPLTE250SRS;A6  ___^^_CJ>OXH#cm[fef05,[[\HPCFL?JIK<:< tjep\[gT_iX7V_N]\](<;=&#$XYXXQѭSY WڵZYVJ;zG:vD7rC5\5*MȥUUGO?l>0X2'߸԰ϫM˧ŢGD@>v<7jwv{}f&XUQP[cPMK<4q:L+"VWIvfz|3WTEEaAKPHz}ry{Lqzjvyxxvu^jo3miqhmyc/Wbc`i{`P[*[ZYYYfY+XWSW{SRCRewRueRQPPQ+PO!NN MILK{KJ\[JjYH GEE7E/CRBfRBr@|>IDAT8b&nNC%Nn& .Ûcc9]ߘM )͎/!ȃ,\i 6"#]piYQ|pPٜޤ)S  T?'i{7S? VT+*K;/J(/J(T!@R`yfeSVnoX푑:@K}G+&$W5Y7myֈ[ n{m=,-,,,ob(cV bRsWM\s܀ڷU-k poM5ugPp*(\W/2=:lՊ-i m掬 ,1@Le3s彷iVYwI>b 6{vm$Ǽi--֭Af8'͙ Y+N8ru5 ,뫫Kao ,A*$Ψc0pv kߛCC2nYb Կ`ՙ) oAG҅/rMuֶMTGΦ-=慆jkg7A[ԹGJ >$;ښJs10vNw3s)>c g300L77333w9,"W[<A񒌠`;^r0sq 8Y`IrS3^Bf>.~̪D({= e^b8RbW?YD`dN%hR@f~PN5sw4(t\Jk5XUI\ZK. /%;蓏 IENDB`html/z_488ba468c84a2858___init___py.html0000644000175000017500000001134215047037077017566 0ustar jenkinsjenkins Coverage for /home/jenkins/mindspore/testcases/testcases/tests/__init__.py: 100%

Coverage for /home/jenkins/mindspore/testcases/testcases/tests/__init__.py: 100%

0 statements  

« prev     ^ index     » next       coverage.py v7.5.4a0.dev2, created at 2025-08-13 15:26 +0800

html/z_08cf99c50893ba22_test_auto_parallel_train_py.html0000644000175000017500000003601715047037077023163 0ustar jenkinsjenkins Coverage for /home/jenkins/mindspore/testcases/testcases/tests/st/auto_parallel/test_auto_parallel_train.py: 80%

Coverage for /home/jenkins/mindspore/testcases/testcases/tests/st/auto_parallel/test_auto_parallel_train.py: 80%

10 statements  

« prev     ^ index     » next       coverage.py v7.5.4a0.dev2, created at 2025-08-13 15:26 +0800

1# Copyright 2020 Huawei Technologies Co., Ltd 

2# 

3# Licensed under the Apache License, Version 2.0 (the "License"); 

4# you may not use this file except in compliance with the License. 

5# You may obtain a copy of the License at 

6# 

7# http://www.apache.org/licenses/LICENSE-2.0 

8# 

9# Unless required by applicable law or agreed to in writing, software 

10# distributed under the License is distributed on an "AS IS" BASIS, 

11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 

12# See the License for the specific language governing permissions and 

13# limitations under the License. 

14# ============================================================================ 

15import os 

16from tests.mark_utils import arg_mark 

17 

18@arg_mark(plat_marks=["platform_ascend910b"], level_mark="level1", card_mark="allcards", essential_mark="essential") 

19def test_msrun_auto_parallel_sharding_propagation(): 

20 ''' 

21 Feature: Auto parallel, strategy:((1,1),(1,2)), parallel_mode is sharding_paopagation 

22 Description: Test auto parallel mode. 

23 Expectation: Run success. 

24 ''' 

25 ret = os.system("export GLOG_v=2 && msrun --worker_num=8 --local_worker_num=8 " 

26 "--master_addr=127.0.0.1 --master_port=10918 " 

27 "--join=True --log_dir=./auto_parallel_logs/sharding_paopagation pytest -s -v " 

28 "auto_parallel_train.py::test_auto_parallel_sharding_propagation") 

29 assert ret == 0 

30 

31 

32@arg_mark(plat_marks=["platform_ascend910b"], level_mark="level1", card_mark="allcards", essential_mark="essential") 

33def test_msrun_auto_parallel_recursive_programming(): 

34 ''' 

35 Feature: Auto parallel, parallel_mode is recursive_programming 

36 Description: Test auto parallel mode. 

37 Expectation: Run success. 

38 ''' 

39 ret = os.system("export GLOG_v=2 && msrun --worker_num=8 --local_worker_num=8 " 

40 "--master_addr=127.0.0.1 --master_port=10919 " 

41 "--join=True --log_dir=./auto_parallel_logs/recursive_programming pytest -s -v " 

42 "auto_parallel_train.py::test_auto_parallel_recursive_programming") 

43 assert ret == 0 

html/z_6beee35d4c9fca87___init___py.html0000644000175000017500000001152415047037077020144 0ustar jenkinsjenkins Coverage for /home/jenkins/mindspore/testcases/testcases/tests/st/common/__init__.py: 100%

Coverage for /home/jenkins/mindspore/testcases/testcases/tests/st/common/__init__.py: 100%

0 statements  

« prev     ^ index     » next       coverage.py v7.5.4a0.dev2, created at 2025-08-13 15:26 +0800

html/z_7eb9929a84352c92_resume_train_utils_py.html0000644000175000017500000003201215047037077021741 0ustar jenkinsjenkins Coverage for /home/jenkins/mindspore/testcases/testcases/tests/st/networks/large_models/resume/resume_train_utils.py: 94%

Coverage for /home/jenkins/mindspore/testcases/testcases/tests/st/networks/large_models/resume/resume_train_utils.py: 94%

14 statements  

« prev     ^ index     » next       coverage.py v7.5.4a0.dev2, created at 2025-08-13 15:26 +0800

1# Copyright 2025 Huawei Technologies Co., Ltd 

2# 

3# Licensed under the Apache License, Version 2.0 (the "License"); 

4# you may not use this file except in compliance with the License. 

5# You may obtain a copy of the License at 

6# 

7# http://www.apache.org/licenses/LICENSE-2.0 

8# 

9# Unless required by applicable law or agreed to in writing, software 

10# distributed under the License is distributed on an "AS IS" BASIS, 

11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 

12# See the License for the specific language governing permissions and 

13# limitations under the License. 

14# ============================================================================ 

15"""Resume training utils.""" 

16 

17import re 

18import os 

19 

20 

21def extract_loss_values(log_file_path): 

22 """extract loss values from log""" 

23 loss_values = [] 

24 loss_pattern = re.compile(r'loss: (\d+\.\d+)') 

25 

26 with open(log_file_path, 'r') as file: 

27 for line in file: 

28 match = loss_pattern.search(line) 

29 if match: 

30 loss_value = float(match.group(1)) 

31 loss_values.append(loss_value) 

32 

33 return loss_values 

34 

35 

36def get_file_mtime(file_path): 

37 return os.path.getmtime(file_path)