Not to raise an error when the training is not successful

Issue #118 resolved
Yin-Jia Zhang created an issue

In amp/amp/ init.py, an error is raised when the energy_rmse and force_rmse convergence criteria is not reached by the following line.

if result is False: raise TrainingConvergenceError('Amp did not converge upon ' 'training. See log file for' ' more information.')

Could we let it not raise an error in such case? The output .amp file and the log file have already indicated that the training is unsuccessful. An error raise will interrupt the subsequent operations after the training.

Comments (3)

  1. andrew_peterson repo owner

    This was intentional. In this case you can re-start training right in your python script if it's not successful. E.g.,

    try:
        calc.train(images)
    except TrainingConvergenceError:
        # Some code here to restart training...
    

    What problems does it create with you? Can you solve it by using a try...except clause?

  2. Yin-Jia Zhang reporter

    Ah, that would work. I am thinking to let qmml to continue even if the convergence criteria is not reached. Thanks a lot!

  3. Log in to comment