Skip to content

Instantly share code, notes, and snippets.

@jasonho-lynx
Created November 12, 2021 09:04
Show Gist options
  • Save jasonho-lynx/d9e3c90971c2ffb4acd336cf27610c85 to your computer and use it in GitHub Desktop.
Save jasonho-lynx/d9e3c90971c2ffb4acd336cf27610c85 to your computer and use it in GitHub Desktop.
# refer to https://github.com/cylynx/verifyml/blob/main/verifyml/model_tests/ModelTest.py for latest version
@dataclass
class ModelTest(ABC):
"""Base class for all FEAT tests"""
result: any = field(init=False, default=None)
passed: bool = field(init=False, default=None)
@abstractmethod
def run(self) -> bool:
"""
Contains logic specific to a model test. This method should:
1. Get test result and update self.result
2. Update self.passed, a boolean indicating if result meets a defined condition
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment