Specifically, how do I 1) ensure that the accuracy and max gradient are greater than zero, and 2) surface an error to the user