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
deepspeed
Commits
66268bd3
Unverified
Commit
66268bd3
authored
Dec 11, 2020
by
Stas Bekman
Committed by
GitHub
Dec 11, 2020
Browse files
add DeepSpeedZeroConfig repr method (#596)
Co-authored-by:
Jeff Rasley
<
jerasley@microsoft.com
>
parent
8a184b6b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
deepspeed/runtime/zero/config.py
deepspeed/runtime/zero/config.py
+4
-0
No files found.
deepspeed/runtime/zero/config.py
View file @
66268bd3
...
@@ -6,6 +6,7 @@ Licensed under the MIT license.
...
@@ -6,6 +6,7 @@ Licensed under the MIT license.
from
deepspeed.runtime.config_utils
import
get_scalar_param
from
deepspeed.runtime.config_utils
import
get_scalar_param
from
deepspeed.utils
import
logger
from
deepspeed.utils
import
logger
from
deepspeed.runtime.zero.constants
import
*
from
deepspeed.runtime.zero.constants
import
*
import
json
class
DeepSpeedZeroConfig
(
object
):
class
DeepSpeedZeroConfig
(
object
):
...
@@ -54,6 +55,9 @@ class DeepSpeedZeroConfig(object):
...
@@ -54,6 +55,9 @@ class DeepSpeedZeroConfig(object):
def
repr
(
self
):
def
repr
(
self
):
return
self
.
__dict__
return
self
.
__dict__
def
__repr__
(
self
):
return
json
.
dumps
(
self
.
__dict__
,
sort_keys
=
True
,
indent
=
4
)
def
_initialize
(
self
,
zero_config_dict
):
def
_initialize
(
self
,
zero_config_dict
):
self
.
stage
=
get_scalar_param
(
zero_config_dict
,
self
.
stage
=
get_scalar_param
(
zero_config_dict
,
ZERO_OPTIMIZATION_STAGE
,
ZERO_OPTIMIZATION_STAGE
,
...
...
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