Skip to content

Commit

Permalink
Fix RunningStage properties for sanity checking (#16774)
Browse files Browse the repository at this point in the history
  • Loading branch information
carmocca authored Feb 16, 2023
1 parent f6cad32 commit 57f2f1c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/lightning/pytorch/trainer/states.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,11 @@ class RunningStage(LightningEnum):

@property
def evaluating(self) -> bool:
return self in (self.VALIDATING, self.TESTING)
return self in (self.VALIDATING, self.TESTING, self.SANITY_CHECKING)

@property
def dataloader_prefix(self) -> Optional[str]:
if self == self.SANITY_CHECKING:
return None
if self == self.VALIDATING:
if self in (self.VALIDATING, self.SANITY_CHECKING):
return "val"
return self.value

Expand Down

0 comments on commit 57f2f1c

Please sign in to comment.