Skip to content

Commit

Permalink
Merge pull request mala-project#580 from RandomDefaultUser/fix_during…
Browse files Browse the repository at this point in the history
…_training_metric

Automatically added during training metric to validation_metrics
  • Loading branch information
RandomDefaultUser authored Oct 7, 2024
2 parents e64fc2f + f058456 commit 89c43ba
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions mala/common/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -780,6 +780,8 @@ def during_training_metric(self, value):
"Currently, MALA can only operate with the "
'"ldos" metric for ddp runs.'
)
if value not in self.validation_metrics:
self.validation_metrics.append(value)
self._during_training_metric = value

@property
Expand Down Expand Up @@ -807,16 +809,6 @@ def after_training_metric(self, value):
)
self._after_training_metric = value

@during_training_metric.setter
def during_training_metric(self, value):
if value != "ldos":
if self._configuration["ddp"]:
raise Exception(
"Currently, MALA can only operate with the "
'"ldos" metric for ddp runs.'
)
self._during_training_metric = value

@property
def use_graphs(self):
"""
Expand Down

0 comments on commit 89c43ba

Please sign in to comment.