1. 提交代码,初始化项目;
This commit is contained in:
35
algos/blank.py
Normal file
35
algos/blank.py
Normal file
@@ -0,0 +1,35 @@
|
||||
import logging
|
||||
from algos import BaseRunner, BaseAlgoModel
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class BlankAlgo(BaseAlgoModel):
|
||||
|
||||
def forward(self, *args, **kwargs):
|
||||
logger.warning("There is no such algo type, running blank algo class.")
|
||||
|
||||
|
||||
class BlankRunner(BaseRunner):
|
||||
|
||||
def build_model(self):
|
||||
logger.warning("There is no such algo runner, running blank building process.")
|
||||
|
||||
def run(self):
|
||||
logger.warning("There is no such algo runner, running blank runner.")
|
||||
|
||||
def run_test(self):
|
||||
logger.warning("There is no such algo runner, running blank testing process.")
|
||||
|
||||
|
||||
def test_blank_runner():
|
||||
runner = BlankRunner()
|
||||
runner.run()
|
||||
runner.run_test()
|
||||
|
||||
def test_blank_algo():
|
||||
algo = BlankAlgo()
|
||||
algo.forward()
|
||||
|
||||
if __name__ == '__main__':
|
||||
test_blank_algo()
|
||||
test_blank_runner()
|
||||
Reference in New Issue
Block a user