"...en/git@developer.sourcefind.cn:OpenDAS/colossalai.git" did not exist on "ddcf58cacf9581d9c59a18f8276d52a061818fab"
Commit 3b88eb22 authored by yuxuan-lou's avatar yuxuan-lou Committed by Frank Lee
Browse files

Flake8 code restyle

parent af801cb4
...@@ -5,7 +5,7 @@ from ._base_gradient_handler import BaseGradientHandler ...@@ -5,7 +5,7 @@ from ._base_gradient_handler import BaseGradientHandler
@GRADIENT_HANDLER.register_module @GRADIENT_HANDLER.register_module
class ZeROGradientHandler(BaseGradientHandler): class ZeROGradientHandler(BaseGradientHandler):
"""A helper class to handle all-reduce operations in a data parallel group. """A helper class to handle all-reduce operations in a data parallel group.
A all-reduce collective communication will be operated in A all-reduce collective communication will be operated in
:func:`handle_gradient` among a data parallel group. :func:`handle_gradient` among a data parallel group.
This class is specialized with ZeRO optimization. This class is specialized with ZeRO optimization.
""" """
......
...@@ -14,7 +14,6 @@ import math ...@@ -14,7 +14,6 @@ import math
class MemTracerOpHook(BaseOpHook): class MemTracerOpHook(BaseOpHook):
""" """
Collect GPU memory usage information Collect GPU memory usage information
:param warmup: This parameter indicates how many iterations to truncate before profiling, defaults to 50 :param warmup: This parameter indicates how many iterations to truncate before profiling, defaults to 50
:type warmup: int :type warmup: int
:param refreshrate: This parameter decides the frequency of write file, defaults to 10 :param refreshrate: This parameter decides the frequency of write file, defaults to 10
...@@ -112,4 +111,4 @@ class MemTracerOpHook(BaseOpHook): ...@@ -112,4 +111,4 @@ class MemTracerOpHook(BaseOpHook):
def save_results(self): def save_results(self):
datafile = f"{self._data_prefix}-{self._rank}.pkl" datafile = f"{self._data_prefix}-{self._rank}.pkl"
self.async_mem_monitor.save(datafile) self.async_mem_monitor.save(datafile)
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment