(self, param_dict)
| 10 | class DeepSpeedFlopsProfilerConfig(DeepSpeedConfigObject): |
| 11 | |
| 12 | def __init__(self, param_dict): |
| 13 | super(DeepSpeedFlopsProfilerConfig, self).__init__() |
| 14 | |
| 15 | self.enabled = None |
| 16 | self.recompute_fwd_factor = None |
| 17 | self.profile_step = None |
| 18 | self.module_depth = None |
| 19 | self.top_modules = None |
| 20 | |
| 21 | if FLOPS_PROFILER in param_dict.keys(): |
| 22 | flops_profiler_dict = param_dict[FLOPS_PROFILER] |
| 23 | else: |
| 24 | flops_profiler_dict = {} |
| 25 | |
| 26 | self._initialize(flops_profiler_dict) |
| 27 | |
| 28 | def _initialize(self, flops_profiler_dict): |
| 29 | self.enabled = get_scalar_param(flops_profiler_dict, FLOPS_PROFILER_ENABLED, FLOPS_PROFILER_ENABLED_DEFAULT) |
nothing calls this directly
no test coverage detected