Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ColossalAI
Commits
3b88eb22
"tests/vscode:/vscode.git/clone" did not exist on "1190b2c4a49e646dc7bfaa54c3544cc19fe56005"
Commit
3b88eb22
authored
Mar 09, 2022
by
yuxuan-lou
Committed by
Frank Lee
Mar 11, 2022
Browse files
Flake8 code restyle
parent
af801cb4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
colossalai/engine/gradient_handler/_zero_gradient_handler.py
colossalai/engine/gradient_handler/_zero_gradient_handler.py
+1
-1
colossalai/engine/ophooks/_memtracer_ophook.py
colossalai/engine/ophooks/_memtracer_ophook.py
+1
-2
No files found.
colossalai/engine/gradient_handler/_zero_gradient_handler.py
View file @
3b88eb22
...
...
@@ -5,7 +5,7 @@ from ._base_gradient_handler import BaseGradientHandler
@
GRADIENT_HANDLER
.
register_module
class
ZeROGradientHandler
(
BaseGradientHandler
):
"""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.
This class is specialized with ZeRO optimization.
"""
...
...
colossalai/engine/ophooks/_memtracer_ophook.py
View file @
3b88eb22
...
...
@@ -14,7 +14,6 @@ import math
class
MemTracerOpHook
(
BaseOpHook
):
"""
Collect GPU memory usage information
:param warmup: This parameter indicates how many iterations to truncate before profiling, defaults to 50
:type warmup: int
:param refreshrate: This parameter decides the frequency of write file, defaults to 10
...
...
@@ -112,4 +111,4 @@ class MemTracerOpHook(BaseOpHook):
def
save_results
(
self
):
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment