5fadb9c18e3de16cc5633175199f9e9e2c381102,rl_coach/graph_managers/graph_manager.py,GraphManager,restore_checkpoint,#GraphManager#,493

Before Change



                // Set the new name
                new_name = var_name
                new_name = new_name.replace("global/", "online/")
                variables[new_name] = var

            for v in self.variables_to_restore:
                self.sess.run(v.assign(variables[v.name.split(":")[0]]))

After Change



        // TODO: find better way to load checkpoints that were saved with a global network into the online network
        if hasattr(self.task_parameters, "checkpoint_restore_dir") and self.task_parameters.checkpoint_restore_dir:
            if self.task_parameters.framework_type == Frameworks.tensorflow:
                self._restore_checkpoint_tf(self.task_parameters.checkpoint_restore_dir)
            elif self.task_parameters.framework_type == Frameworks.mxnet:
                // TODO implement checkpoint restore
                pass
            else:
                raise ValueError("Invalid framework {}".format(self.task_parameters.framework_type))

    def occasionally_save_checkpoint(self):
        // only the chief process saves checkpoints
        if self.task_parameters.checkpoint_save_secs \
                and time.time() - self.last_checkpoint_saving_time >= self.task_parameters.checkpoint_save_secs \
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: NervanaSystems/coach
Commit Name: 5fadb9c18e3de16cc5633175199f9e9e2c381102
Time: 2018-11-07
Author: sina.beh@gmail.com
File Name: rl_coach/graph_managers/graph_manager.py
Class Name: GraphManager
Method Name: restore_checkpoint


Project Name: allenai/allennlp
Commit Name: 1691cb3a61740fbbc8305d52d4e830c79302a666
Time: 2018-10-10
Author: pradeep.dasigi@gmail.com
File Name: allennlp/semparse/executors/wikitables_variable_free_executor.py
Class Name: WikiTablesVariableFreeExecutor
Method Name: filter_in


Project Name: allenai/allennlp
Commit Name: 1691cb3a61740fbbc8305d52d4e830c79302a666
Time: 2018-10-10
Author: pradeep.dasigi@gmail.com
File Name: allennlp/semparse/executors/wikitables_variable_free_executor.py
Class Name: WikiTablesVariableFreeExecutor
Method Name: filter_not_in