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
67454c39
Commit
67454c39
authored
Feb 12, 2024
by
Jennifer
Browse files
bugfixes and adds a section to convert optim files
parent
638fbaf6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
0 deletions
+2
-0
openfold/utils/import_weights.py
openfold/utils/import_weights.py
+1
-0
train_openfold.py
train_openfold.py
+1
-0
No files found.
openfold/utils/import_weights.py
View file @
67454c39
...
@@ -670,6 +670,7 @@ def import_jax_weights_(model, npz_path, version="model_1"):
...
@@ -670,6 +670,7 @@ def import_jax_weights_(model, npz_path, version="model_1"):
def
convert_deprecated_v1_keys
(
state_dict
):
def
convert_deprecated_v1_keys
(
state_dict
):
"""Update older OpenFold model weight names to match the current model code."""
"""Update older OpenFold model weight names to match the current model code."""
logging
.
warning
(
'converting keys...'
)
replacements
=
{
replacements
=
{
'template_angle_embedder'
:
'template_single_embedder'
,
'template_angle_embedder'
:
'template_single_embedder'
,
...
...
train_openfold.py
View file @
67454c39
...
@@ -43,6 +43,7 @@ from scripts.zero_to_fp32 import (
...
@@ -43,6 +43,7 @@ from scripts.zero_to_fp32 import (
get_fp32_state_dict_from_zero_checkpoint
,
get_fp32_state_dict_from_zero_checkpoint
,
get_global_step_from_zero_checkpoint
get_global_step_from_zero_checkpoint
)
)
from
scripts.zero_to_fp32
import
get_optim_files
,
parse_optim_states
,
get_model_state_file
from
openfold.utils.logger
import
PerformanceLoggingCallback
from
openfold.utils.logger
import
PerformanceLoggingCallback
...
...
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