Skip to content

Commit

Permalink
Update TorchScript call in inference script
Browse files Browse the repository at this point in the history
  • Loading branch information
gahdritz committed Nov 18, 2021
1 parent 326e08d commit 8d1119d
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions run_pretrained_openfold.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,19 @@
from openfold.config import model_config
from openfold.data import templates, feature_pipeline, data_pipeline
from openfold.model.model import AlphaFold
from openfold.model.primitives import Attention, GlobalAttention
from openfold.model.torchscript import script_primitives_
from openfold.np import residue_constants, protein
import openfold.np.relax.relax as relax
from openfold.utils.import_weights import (
import_jax_weights_,
)
from openfold.utils.torchscript_utils import script_submodules_
from openfold.utils.tensor_utils import (
tensor_tree_map,
)

from scripts.utils import add_data_args


def script_primitives_(model):
script_submodules_(model, [Attention, GlobalAttention])


def main(args):
config = model_config(args.model_name)
model = AlphaFold(config)
Expand Down

0 comments on commit 8d1119d

Please sign in to comment.