mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-04-29 06:46:22 +02:00
Fixed lots of breaking tests, reduced step size for checkgrad to 1e-4 in tests (perhaps this should be global), added some missing attributes to data_resources.json
This commit is contained in:
parent
cb6c1dd0d2
commit
f8707c3918
6 changed files with 19 additions and 45 deletions
|
|
@ -19,25 +19,12 @@ class ExamplesTests(unittest.TestCase):
|
|||
def _model_instance(self, Model):
|
||||
self.assertTrue(isinstance(Model, GPy.models))
|
||||
|
||||
"""
|
||||
def model_instance_generator(model):
|
||||
def check_model_returned(self):
|
||||
self._model_instance(model)
|
||||
return check_model_returned
|
||||
|
||||
def checkgrads_generator(model):
|
||||
def model_checkgrads(self):
|
||||
self._checkgrad(model)
|
||||
return model_checkgrads
|
||||
"""
|
||||
|
||||
def model_checkgrads(model):
|
||||
model.randomize()
|
||||
#assert model.checkgrad()
|
||||
return model.checkgrad()
|
||||
#NOTE: Step as 1e-4, this should be acceptable for more peaky models
|
||||
return model.checkgrad(step=1e-4)
|
||||
|
||||
def model_instance(model):
|
||||
#assert isinstance(model, GPy.core.model)
|
||||
return isinstance(model, GPy.core.model.Model)
|
||||
|
||||
def flatten_nested(lst):
|
||||
|
|
@ -66,9 +53,11 @@ def test_models():
|
|||
print "After"
|
||||
print functions
|
||||
for example in functions:
|
||||
#if example[0] in ['oil', 'silhouette', 'GPLVM_oil_100', 'brendan_faces']:
|
||||
#print "SKIPPING"
|
||||
#continue
|
||||
if example[0] in ['epomeo_gpx']:
|
||||
#These are the edge cases that we might want to handle specially
|
||||
if example[0] == 'epomeo_gpx' and not GPy.util.datasets.gpxpy_available:
|
||||
print "Skipping as gpxpy is not available to parse GPS"
|
||||
continue
|
||||
|
||||
print "Testing example: ", example[0]
|
||||
# Generate model
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue