{"issue":{"state":"open","pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"milestone":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/cecd326d907915e676ae9deb724cea0e?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"cecd326d907915e676ae9deb724cea0e","url":"https://api.github.com/users/JustinSGray","login":"JustinSGray","id":57273},"assignee":{"avatar_url":"https://secure.gravatar.com/avatar/2326d9bf650cd5412a1e0329c41d35c7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"2326d9bf650cd5412a1e0329c41d35c7","url":"https://api.github.com/users/naylor-b","login":"naylor-b","id":701448},"updated_at":"2011-11-14T20:09:24Z","labels":[],"comments":0,"closed_at":null,"url":"https://api.github.com/repos/OpenMDAO/OpenMDAO-Framework/issues/698","body":"The metamodel should not change the values of the current metamodel inputs when reset training data flag is triggered. Currently, the values get reset the trait defaults\r\n\r\n    from openmdao.lib.components.api import MetaModel\r\n    from openmdao.lib.surrogatemodels.api import KrigingSurrogate\r\n    from openmdao.lib.datatypes.api import Float\r\n    from openmdao.main.api import Component, Assembly\r\n    \r\n    class Dummy(Component): \r\n        x = Float(1.2,iotype=\"in\")\r\n        y = Float(0,iotype=\"out\")\r\n    \r\n        def execute(self): \r\n            self.y = 2*self.x\r\n                \r\n    class Sim(Assembly):\r\n        def __init__(self): \r\n            super(Sim,self).__init__()\r\n            \r\n            self.add('mm',MetaModel())\r\n            self.mm.surrogate = {'default':KrigingSurrogate()}\r\n            self.mm.model = Dummy()\r\n            \r\n    s = Sim()\r\n    \r\n    s.mm.train_next = True\r\n    s.mm.x = 1\r\n    s.run()\r\n    print s.mm.x\r\n    \r\n    s.mm.train_next = True\r\n    s.mm.x = 2\r\n    s.run()\r\n    print s.mm.x\r\n    \r\n    s.mm.x = 10\r\n    s.mm.reset_training_data = True\r\n    #all meta model inputs should remain at their current values\r\n    print s.mm.x #gets set back to 0, which is the default value for the trait","html_url":"https://github.com/OpenMDAO/OpenMDAO-Framework/issues/698","title":"MetaModel Reset Training Data Event Bug","number":698,"id":2235393,"created_at":"2011-11-14T20:09:24Z"},"action":"opened"}