Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
Fix serve sanity checking
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanwharris committed Jun 29, 2021
1 parent da5b5a8 commit b8ae801
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion flash/core/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,15 @@ def __init__(self, *args, serve_sanity_check: bool = False, **kwargs):

self.serve_sanity_check = serve_sanity_check

def _run_sanity_check(self, ref_model):
if hasattr(super(), "_run_sanity_check"):
super()._run_sanity_check(ref_model)

self.run_sanity_check(ref_model)

def run_sanity_check(self, ref_model):
super().run_sanity_check(ref_model)
if hasattr(super(), "run_sanity_check"):
super().run_sanity_check(ref_model)

if self.serve_sanity_check and ref_model.is_servable and _SERVE_AVAILABLE:
ref_model.run_serve_sanity_check()
Expand Down

0 comments on commit b8ae801

Please sign in to comment.