cef785da2891f282d420f32df7e5365cf3414a85,torchsample/callbacks.py,TQDM,on_batch_end,#TQDM#Any#Any#,131

Before Change


        self.progbar.update(1)

    def on_batch_end(self, batch, logs=None):
        self.progbar.set_postfix({
            "Loss": "%.04f" % 
            (self.model.history.loss / self.model.history.samples_seen)})


class History(Callback):

After Change


    def on_batch_end(self, batch, logs=None):
        log_data = {key: "%.04f" % value for key, value in self.model.history.batch_metrics.items()}
        for k, v in logs.items():
            if k.endswith("metric"):
                log_data[k.split("_metric")[0]] = "%.02f" % v
        self.progbar.set_postfix(log_data)


class History(Callback):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: ncullen93/torchsample
Commit Name: cef785da2891f282d420f32df7e5365cf3414a85
Time: 2017-04-27
Author: ncullen@modv-vlan533.0919.apn.wlan.wireless-pennnet.upenn.edu
File Name: torchsample/callbacks.py
Class Name: TQDM
Method Name: on_batch_end


Project Name: commonsense/conceptnet5
Commit Name: d3ee4125592e31af6d7548ad80728de1e74750dd
Time: 2015-06-22
Author: jchin@luminoso.com
File Name: ninja.py
Class Name:
Method Name: parse_conceptnet4


Project Name: pantsbuild/pants
Commit Name: f90b9826f064af61556c92e4bbc573861ee0b9fe
Time: 2020-09-28
Author: 14852634+Eric-Arellano@users.noreply.github.com
File Name: src/python/pants/backend/python/dependency_inference/module_mapper.py
Class Name:
Method Name: map_first_party_modules_to_addresses