Misleading name and documentation for `Spherical(In|Co)variants.update_hyperparameters()`
max-veit opened this issue · 4 comments
Judging from the name and documentation of this function -- e.g. here: https://github.com/cosmo-epfl/librascal/blob/43a410c6d7cea3d17852e9c8c6fe332ec46f13df/bindings/rascal/representations/spherical_expansion.py#L236-L240
-- I would expect this function to also update the parameters of the underlying C++ object, so that further calls to the transform()
method use the representation with the updated parameters. However, the code makes it clear that this is not the case, and that this is simply a parameter validation method for internal use only.
Fix: Rename the function and documentation to reflect this fact. Instead of allowing (or promising to allow) updating of hypers on the fly, just encourage the user to make a new representation.
Suggestion for rename of the function: _shallow_update(self, **hypers)
The private makes the user aware that it should be used with care and the hypers can be induced from the input arguments.
We should use the hacky solution for a new update_hyperparameters()
function
Sorry, what hacky solution?