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
cfd2e719
Commit
cfd2e719
authored
Mar 25, 2024
by
Jennifer
Browse files
seed workers fix and validation_epoch_end extra argument
parent
a317ad27
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
train_openfold.py
train_openfold.py
+3
-3
No files found.
train_openfold.py
View file @
cfd2e719
...
...
@@ -9,6 +9,7 @@ from pytorch_lightning.callbacks.lr_monitor import LearningRateMonitor
from
pytorch_lightning.callbacks.model_checkpoint
import
ModelCheckpoint
from
pytorch_lightning.loggers
import
WandbLogger
from
pytorch_lightning.strategies
import
DeepSpeedStrategy
,
DDPStrategy
from
pytorch_lightning
import
seed_everything
import
torch
from
openfold.config
import
model_config
...
...
@@ -24,7 +25,6 @@ from openfold.utils.exponential_moving_average import ExponentialMovingAverage
from
openfold.utils.loss
import
AlphaFoldLoss
,
lddt_ca
from
openfold.utils.lr_schedulers
import
AlphaFoldLRScheduler
from
openfold.utils.multi_chain_permutation
import
multi_chain_permutation_align
from
openfold.utils.seed
import
seed_everything
from
openfold.utils.superimposition
import
superimpose
from
openfold.utils.tensor_utils
import
tensor_tree_map
from
openfold.utils.validation_metrics
import
(
...
...
@@ -155,7 +155,7 @@ class OpenFoldWrapper(pl.LightningModule):
self
.
_log
(
loss_breakdown
,
batch
,
outputs
,
train
=
False
)
def
on_validation_epoch_end
(
self
,
_
):
def
on_validation_epoch_end
(
self
):
# Restore the model weights to normal
self
.
model
.
load_state_dict
(
self
.
cached_weights
)
self
.
cached_weights
=
None
...
...
@@ -276,7 +276,7 @@ class OpenFoldWrapper(pl.LightningModule):
def
main
(
args
):
if
(
args
.
seed
is
not
None
):
seed_everything
(
args
.
seed
)
seed_everything
(
args
.
seed
,
workers
=
True
)
config
=
model_config
(
args
.
config_preset
,
...
...
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