Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boltz.model.models.boltz.BoltzPreview not found #127

Open
derby-ding opened this issue Dec 26, 2024 · 2 comments
Open

boltz.model.models.boltz.BoltzPreview not found #127

derby-ding opened this issue Dec 26, 2024 · 2 comments

Comments

@derby-ding
Copy link

When training using confidence.yaml, Error locating target'boltz.model.models.boltz.BoltzPreview'.

If change models.boltz.BoltzPreview to model.Boltz1, we get error Boltz1.init() got an unexpected keyword argument 'run_trunk_and_structure'

gcorso added a commit that referenced this issue Dec 27, 2024
@gcorso
Copy link
Collaborator

gcorso commented Dec 27, 2024

Thanks for pointing this out, I should have fixed the config!
Let me know if you run into any other issues!

@derby-ding
Copy link
Author

derby-ding commented Dec 30, 2024

Thanks for your reply. However, while using the new confidence.ymal to train the confidence layers, there is another error in the 'train.py' says local variable 'file_path' referenced before assignment. So I modified the code to load pretrained checkpoint. Not sure if it's the right way.
if cfg.pretrained and not cfg.resume:
# Load the pretrained weights into the confidence module
model_module = type(model_module).load_from_checkpoint(
cfg.pretrained, strict=False, **(model_module.hparams)
)
if cfg.load_confidence_from_trunk:
checkpoint = torch.load(cfg.pretrained, map_location="cpu")

        # Modify parameter names in the state_dict
        confidence_state_dict = {}
        for key, value in checkpoint["state_dict"].items():
            if not key.startswith("structure_module") and not key.startswith(
                "distogram_module"
            ):
                new_key = "confidence_module." + key
                confidence_state_dict[new_key] = value
        model_module.confidence_module.load_state_dict(confidence_state_dict, strict=False)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants