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
OpenFold
Commits
872787b9
Commit
872787b9
authored
Oct 21, 2021
by
Gustaf Ahdritz
Browse files
Add gradient clipping to DeepSpeed config generator
parent
ac058f54
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
scripts/build_deepspeed_config.py
scripts/build_deepspeed_config.py
+5
-0
No files found.
scripts/build_deepspeed_config.py
View file @
872787b9
...
...
@@ -20,6 +20,8 @@ parser = argparse.ArgumentParser(description='''Outputs a DeepSpeed
configuration file to
stdout'''
)
parser
.
add_argument
(
"--gradient_clipping"
,
type
=
float
,
default
=
None
,
help
=
"Value of gradient clipping"
)
p
=
parser
.
add_argument_group
(
"Optimizer"
)
p
.
add_argument
(
"--optimizer"
,
default
=
None
,
help
=
'''Choice of optimizer. Choose between "Adam" or
...
...
@@ -295,4 +297,7 @@ flops_profiler["top_modules"] = args.top_modules
flops_profiler
[
"detailed"
]
=
args
.
detailed_flops_profile
d
[
"flops_profiler"
]
=
flops_profiler
if
(
args
.
gradient_clipping
):
d
[
"gradient_clipping"
]
=
args
.
gradient_clipping
print
(
json
.
dumps
(
d
,
indent
=
2
))
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