Materials Learning Algorithms. A framework for machine learning materials properties from first-principles data.
BSD 3-Clause "New" or "Revised" License
81
stars
25
forks
source link
Code duplications in `predictor.py` #508
Open
elcorto opened 5 months ago
https://github.com/mala-project/mala/blob/9b0c4fc45dc93c9e7165302d9cb0d56eb1e5fb32/mala/network/predictor.py#L37-L40 in
__init__
is the same as https://github.com/mala-project/mala/blob/9b0c4fc45dc93c9e7165302d9cb0d56eb1e5fb32/mala/network/predictor.py#L65-L68 inpredict_from_qeout()
. Since the former is in the constructor, I think the latter can be skipped.Also here https://github.com/mala-project/mala/blob/9b0c4fc45dc93c9e7165302d9cb0d56eb1e5fb32/mala/network/predictor.py#L105-L110
self.data.grid_dimension = self.parameters.inference_data_grid
is already performed in__init__
so the check could be changed to something likeNote:
<= 0
would be correct but I gessnp.prod(self.parameters.inference_data_grid)
is never < 0.