awslabs / sagemaker-debugger

Amazon SageMaker Debugger provides functionality to save tensors during training of machine learning jobs and analyze those tensors
Apache License 2.0
158 stars 82 forks source link

Move zero code change tests #544

Closed mariumof closed 2 years ago

mariumof commented 2 years ago

Description of changes:

Style and formatting:

I have run pre-commit install && pre-commit run --all-files to ensure that auto-formatting happens with every commit.

Issue number, if available

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

codecov-commenter commented 2 years ago

Codecov Report

Merging #544 (83866d7) into master (6903873) will decrease coverage by 2.20%. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #544      +/-   ##
==========================================
- Coverage   75.53%   73.32%   -2.21%     
==========================================
  Files         127      117      -10     
  Lines       10917    10591     -326     
==========================================
- Hits         8246     7766     -480     
- Misses       2671     2825     +154     
Impacted Files Coverage Δ
smdebug/tensorflow/reductions.py 0.00% <0.00%> (-47.06%) :arrow_down:
...iler/analysis/utils/pytorch_dataloader_analysis.py 0.00% <0.00%> (-44.95%) :arrow_down:
smdebug/pytorch/utils.py 46.51% <0.00%> (-37.21%) :arrow_down:
smdebug/core/modes.py 55.00% <0.00%> (-30.00%) :arrow_down:
...mdebug/profiler/analysis/notebook_utils/heatmap.py 0.00% <0.00%> (-13.01%) :arrow_down:
smdebug/xgboost/hook.py 0.00% <0.00%> (-8.43%) :arrow_down:
smdebug/core/logger.py 70.83% <0.00%> (-8.34%) :arrow_down:
smdebug/core/reduction_config.py 88.31% <0.00%> (-7.80%) :arrow_down:
smdebug/core/writer.py 85.58% <0.00%> (-6.31%) :arrow_down:
smdebug/profiler/utils.py 72.22% <0.00%> (-4.94%) :arrow_down:
... and 25 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 6903873...83866d7. Read the comment docs.

adimux commented 2 years ago

get_hook() is always used, not only for zero-code-change. Even when the hook is manually created, it gets registered in a global variable. At the end of the training phase, I'm pretty sure get_hook().cleanup() gets called.