-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Define interface for Acto's test results (#303)
* Define interface for test result Signed-off-by: Tyler Gu <[email protected]> Fix run_trial return stmt Signed-off-by: Tyler Gu <[email protected]> Fix results' serialization Signed-off-by: Tyler Gu <[email protected]> Fix bug reproduction test Signed-off-by: Tyler Gu <[email protected]> Fix Secret number comparison Signed-off-by: Tyler Gu <[email protected]> * Fix model serialization Signed-off-by: Tyler Gu <[email protected]> * Fix TrialResult dump Signed-off-by: Tyler Gu <[email protected]> --------- Signed-off-by: Tyler Gu <[email protected]>
- Loading branch information
Showing
288 changed files
with
196,041 additions
and
199,338 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,20 @@ | ||
"""Checker interface""" | ||
from abc import ABC, abstractmethod | ||
from typing import Optional | ||
|
||
from acto.common import OracleResult | ||
from acto.result import OracleResult | ||
from acto.snapshot import Snapshot | ||
|
||
|
||
class Checker(ABC): | ||
class CheckerInterface(ABC): | ||
"""Interface for checkers""" | ||
|
||
@property | ||
@abstractmethod | ||
def name(self): | ||
raise NotImplementedError | ||
|
||
def __init__(self, **kwargs): | ||
def __init__(self): | ||
pass | ||
|
||
@abstractmethod | ||
def check(self, generation: int, snapshot: Snapshot, prev_snapshot: Snapshot) -> OracleResult: | ||
def check( | ||
self, generation: int, snapshot: Snapshot, prev_snapshot: Snapshot | ||
) -> Optional[OracleResult]: | ||
"""Check the given step and return the result of the check""" | ||
raise NotImplementedError() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.