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

Issue of training the building block encoder #20

Open
FrancisFengbin opened this issue May 27, 2024 · 2 comments
Open

Issue of training the building block encoder #20

FrancisFengbin opened this issue May 27, 2024 · 2 comments

Comments

@FrancisFengbin
Copy link

FrancisFengbin commented May 27, 2024

Hello, I got an error that when running the python mofdiff/scripts/train.py --config-name=bb > ./testmilnew1.out . And the output is

pytorch_lightning.utilities.exceptions.MisconfigurationException: ReduceLROnPlateau conditioned on metric val_loss which is not available. Available metrics are: ['train_num_atom_loss', 'train_num_atom_loss_step', 'train_num_cp_loss', 'train_num_cp_loss_step', 'train_diameter_loss', 'train_diameter_loss_step', 'train_id_loss', 'train_id_loss_step', 'train_loss', 'train_loss_step', 'z_norm', 'z_norm_step', 'train_num_atom_loss_epoch', 'train_num_cp_loss_epoch', 'train_diameter_loss_epoch', 'train_id_loss_epoch', 'train_loss_epoch', 'z_norm_epoch']. Condition can be set using `monitor` key in lr scheduler dict

It seems that ReduceLROnPlateau relies on a loss metric from the validation set, such as val_loss. But I found # building block embedding space learning does not involve validation or testing. in bb_encoder.py. So what can I do to deal with this bug? Thanks!

@nayoung10
Copy link

nayoung10 commented Jun 1, 2024

Hi, I encountered the same problem. Under bb_encoder.py, try fixing the return value of def configure_optimizers as follows:

return { "optimizer": opt, "lr_scheduler": { "scheduler": scheduler, "strict": False, "monitor": "val_loss" }, }

@FrancisFengbin
Copy link
Author

@lkny123 Thanks! I'll give it a try.

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