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
3f592307
Commit
3f592307
authored
Oct 02, 2023
by
Sachin Kadyan
Browse files
Reduce redundancy in seq embedding config presets
parent
6aefa986
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
18 deletions
+8
-18
openfold/config.py
openfold/config.py
+8
-18
No files found.
openfold/config.py
View file @
3f592307
...
...
@@ -154,38 +154,20 @@ def model_config(
c
.
loss
.
tm
.
weight
=
0.1
# SINGLE SEQUENCE EMBEDDING PRESETS
elif
name
==
"seqemb_initial_training"
:
# Tell the data pipeline that we will use sequence embeddings instead of MSAs.
c
.
data
.
seqemb_mode
.
enabled
=
True
c
.
globals
.
seqemb_mode_enabled
=
True
# In seqemb mode, we turn off the ExtraMSAStack and Evoformer's column attention.
c
.
model
.
extra_msa
.
enabled
=
False
c
.
model
.
evoformer_stack
.
no_column_attention
=
True
c
.
data
.
train
.
max_msa_clusters
=
1
c
.
data
.
eval
.
max_msa_clusters
=
1
elif
name
==
"seqemb_finetuning"
:
c
.
data
.
seqemb_mode
.
enabled
=
True
c
.
globals
.
seqemb_mode_enabled
=
True
c
.
model
.
extra_msa
.
enabled
=
False
c
.
model
.
evoformer_stack
.
no_column_attention
=
True
c
.
data
.
train
.
max_msa_clusters
=
1
c
.
data
.
eval
.
max_msa_clusters
=
1
c
.
data
.
train
.
crop_size
=
384
c
.
loss
.
violation
.
weight
=
1.
c
.
loss
.
experimentally_resolved
.
weight
=
0.01
elif
name
==
"seq_model_esm1b"
:
c
.
data
.
seqemb_mode
.
enabled
=
True
c
.
globals
.
seqemb_mode_enabled
=
True
c
.
model
.
extra_msa
.
enabled
=
False
c
.
model
.
evoformer_stack
.
no_column_attention
=
True
c
.
data
.
common
.
use_templates
=
True
c
.
data
.
common
.
use_template_torsion_angles
=
True
c
.
model
.
template
.
enabled
=
True
c
.
data
.
predict
.
max_msa_clusters
=
1
elif
name
==
"seq_model_esm1b_ptm"
:
c
.
data
.
seqemb_mode
.
enabled
=
True
c
.
globals
.
seqemb_mode_enabled
=
True
c
.
model
.
extra_msa
.
enabled
=
False
c
.
model
.
evoformer_stack
.
no_column_attention
=
True
c
.
data
.
common
.
use_templates
=
True
c
.
data
.
common
.
use_template_torsion_angles
=
True
c
.
model
.
template
.
enabled
=
True
...
...
@@ -195,6 +177,14 @@ def model_config(
else
:
raise
ValueError
(
"Invalid model name"
)
if
name
.
startswith
(
"seq"
):
# Tell the data pipeline that we will use sequence embeddings instead of MSAs.
c
.
data
.
seqemb_mode
.
enabled
=
True
c
.
globals
.
seqemb_mode_enabled
=
True
# In seqemb mode, we turn off the ExtraMSAStack and Evoformer's column attention.
c
.
model
.
extra_msa
.
enabled
=
False
c
.
model
.
evoformer_stack
.
no_column_attention
=
True
if
long_sequence_inference
:
assert
(
not
train
)
c
.
globals
.
offload_inference
=
True
...
...
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