Skip to content

Commit

Permalink
add early_stopping
Browse files Browse the repository at this point in the history
  • Loading branch information
LukyanovKirillML committed Jul 18, 2024
1 parent b7bd4df commit 2e4846d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/models_builder/gnn_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -795,11 +795,16 @@ def train_complete(self, gen_dataset, steps=None, pbar=None, metrics=None, **kwa
print("epoch", self.modification.epochs)
train_loss = self.train_1_step(gen_dataset)
self._after_epoch(gen_dataset)
self.early_stopping(train_loss=train_loss, gen_dataset=gen_dataset,
metrics=metrics)
if self.socket:
self.report_results(train_loss=train_loss, gen_dataset=gen_dataset,
metrics=metrics)
pbar.update(1)

def early_stopping(self, train_loss, gen_dataset, metrics):
pass

def train_1_step(self, gen_dataset):
task_type = gen_dataset.domain()
if self.mi_defender:
Expand Down

0 comments on commit 2e4846d

Please sign in to comment.