You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Much like there is test.judge(model), there should be test.optimize(model), at least for those test classes which support it (i.e. which have an optimization framework). This could be done via an Optimizable mix-in, e.g.:
class Optimizable:
def optimize(self, model, **kwargs):
[code here]
And then e.g. VmTest could have its signature redefined from class VmTest(sciunit.Test) to class VmTest(sciunit.Test, Optimizable).
I seem to have misunderstood the intention the first time I read this. What I did do instead is make a new test class that inherits from python dictionaries, and then make optimize a method of this new abstract dictionary. To meet your desired specifications, would require more work. I believe the feature is a type of syntactic sugar. I don't think we should be held up by it, as I don't think its critical for delivering a product.
Make Sciunit Optimize a method of NU test.
This would mean creating a method inside the NU test class init.py or base.py of NU test class.
The text was updated successfully, but these errors were encountered: