parlai/core/worlds.py
def update_counters(self):
        """Update how many epochs have completed"""
        self.total_parleys += 1
        if self.max_exs is None:
            if ('num_epochs' in self.opt and self.opt['num_epochs'] > 0):
                self.max_exs = self.num_examples() * self.opt['num_epochs'] if self.num_examples() else -1
            else:
                self.max_exs = -1
        # when we know the size of the data
        if self.max_exs > 0:
            self.total_epochs = self.total_parleys * self.opt.get('batchsize', 1) / self.num_examples()
        # when we do not know the size of the data
        else:
            if self.epoch_done():
                self.total_epochs += 1
Update how many epochs have completed
Update how many epochs have completed
Update how many epochs have completed
def update_counters(self):
        self.total_parleys += 1
        if self.max_exs is None:
            if ('num_epochs' in self.opt and self.opt['num_epochs'] > 0):
                self.max_exs = self.num_examples() * self.opt['num_epochs'] if self.num_examples() else -1
            else:
                self.max_exs = -1
        if self.max_exs > 0:
            self.total_epochs = self.total_parleys * self.opt.get('batchsize', 1) / self.num_examples()
        else:
            if self.epoch_done():
                self.total_epochs += 1
def update_counters ( self ) : self . total_parleys += 1 if self . max_exs is None : if ( 'num_epochs' in self . opt and self . opt [ 'num_epochs' ] > 0 ) : self . max_exs = self . num_examples ( ) * self . opt [ 'num_epochs' ] if self . num_examples ( ) else - 1 else : self . max_exs = - 1 if self . max_exs > 0 : self . total_epochs = self . total_parleys * self . opt . get ( 'batchsize' , 1 ) / self . num_examples ( ) else : if self . epoch_done ( ) : self . total_epochs += 1
Update how many epochs have completed
Update how many epochs have completed
"""Update how many epochs have completed""" # when we know the size of the data # when we do not know the size of the data
self