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

fix lightning hparams conflict #205

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
5 changes: 4 additions & 1 deletion torchmdnet/scripts/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,10 @@ def main():
trainer.fit(model, data, ckpt_path=None if args.reset_trainer else args.load_model)

# run test set after completing the fit
model = LNNP.load_from_checkpoint(trainer.checkpoint_callback.best_model_path)
model = LNNP.load_from_checkpoint(
trainer.checkpoint_callback.best_model_path,
hparams_file=f"{args.log_dir}/input.yaml",
)
trainer = pl.Trainer(
logger=_logger,
inference_mode=False,
Expand Down
Loading