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
1ae833bf
Commit
1ae833bf
authored
Apr 19, 2024
by
Jennifer
Browse files
Updates low_precision check to use current precision settings.
parent
80e63410
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
train_openfold.py
train_openfold.py
+6
-2
No files found.
train_openfold.py
View file @
1ae833bf
...
@@ -287,10 +287,13 @@ def main(args):
...
@@ -287,10 +287,13 @@ def main(args):
if
(
args
.
seed
is
not
None
):
if
(
args
.
seed
is
not
None
):
seed_everything
(
args
.
seed
,
workers
=
True
)
seed_everything
(
args
.
seed
,
workers
=
True
)
is_low_precision
=
args
.
precision
in
[
"bf16-mixed"
,
"16"
,
"bf16"
,
"16-true"
,
"16-mixed"
,
"bf16-mixed"
]
config
=
model_config
(
config
=
model_config
(
args
.
config_preset
,
args
.
config_preset
,
train
=
True
,
train
=
True
,
low_prec
=
(
str
(
args
.
precision
)
==
"16"
)
low_prec
=
is_low_precision
,
)
)
if
args
.
experiment_config_json
:
if
args
.
experiment_config_json
:
with
open
(
args
.
experiment_config_json
,
'r'
)
as
f
:
with
open
(
args
.
experiment_config_json
,
'r'
)
as
f
:
...
@@ -643,7 +646,8 @@ if __name__ == "__main__":
...
@@ -643,7 +646,8 @@ if __name__ == "__main__":
"--num_nodes"
,
type
=
int
,
default
=
1
,
"--num_nodes"
,
type
=
int
,
default
=
1
,
)
)
trainer_group
.
add_argument
(
trainer_group
.
add_argument
(
"--precision"
,
type
=
str
,
default
=
'bf16'
,
help
=
'Sets precision, lower precision improves runtime performance.'
"--precision"
,
type
=
str
,
default
=
'bf16'
,
help
=
'Sets precision, lower precision improves runtime performance.'
,
)
)
trainer_group
.
add_argument
(
trainer_group
.
add_argument
(
"--max_epochs"
,
type
=
int
,
default
=
1
,
"--max_epochs"
,
type
=
int
,
default
=
1
,
...
...
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