Extra keyword arguments

Issue #45 resolved
andrew_peterson repo owner created an issue

At least in v0.4 (and probably v0.5), if a user mis-spells a keyword argument no error is raised and the user could easily think that the code was doing what they wanted. This happened when I used the new (v0.5) keyword model instead of the v0.4 keyword regression. When I specified model=NeuralNetwork(...) it does not raise an error, and when it does not see anything specified for regression it just sets it to its default, which happens to be a neural network. So it appears to run normally, except for any parameters I had specified to the NeuralNetwork are ignored.

This behavior comes from our passing **kwargs to the ase.calculators.Calculator object that Amp inherits from. ASE takes these kwargs and puts them in its parameters dictionary.

Do we actually ever need ASE to add random keyword arguments to a parameters dictionary? Perhaps we could solve this by just not passing **kwargs to Calculator?

Comments (3)

  1. Alireza Khorshidi

    This seems to be a problem with Calculator object. That is I can do

    from ase.calculators.calculator import Calculator
    
    testcalc = Calculator(alireza=1) 
    

    and it will raise no error. Should we remove **kwargs from Amp input arguments?

  2. Log in to comment