39a0c98b1ec9adb55386544c870f99cb8ff8f447,slm_lab/agent/__init__.py,Agent,update,#Agent#Any#Any#Any#Any#,65

Before Change


        loss = self.algorithm.train()
        explore_var = self.algorithm.update()
        self.loss_history.append(loss)
        self.explore_var_history.append(explore_var)

    def close(self):
        """Close agent at the end of a session, e.g. save model"""
        // TODO save model

After Change


        data_names = ["loss", "explore_var"]
        loss_a, explore_var_a = self.agent_space.aeb_space.init_data_s(
            data_names, a=self.a)
        for (e, b), body in util.ndenumerate_nonan(self.body_a):
            loss_a[(e, b)] = loss
            explore_var_a[(e, b)] = explore_var
        return loss_a, explore_var_a

    def close(self):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: kengz/SLM-Lab
Commit Name: 39a0c98b1ec9adb55386544c870f99cb8ff8f447
Time: 2017-12-31
Author: kengzwl@gmail.com
File Name: slm_lab/agent/__init__.py
Class Name: Agent
Method Name: update


Project Name: kengz/SLM-Lab
Commit Name: 8c17debc9dc6552da8c317c0c852b55f03c80c61
Time: 2017-12-24
Author: kengzwl@gmail.com
File Name: slm_lab/env/__init__.py
Class Name: Env
Method Name: step


Project Name: kengz/SLM-Lab
Commit Name: 8c17debc9dc6552da8c317c0c852b55f03c80c61
Time: 2017-12-24
Author: kengzwl@gmail.com
File Name: slm_lab/agent/algorithm/base.py
Class Name: Algorithm
Method Name: act