add inference

This commit is contained in:
2024-09-19 00:14:26 +08:00
parent 9ec3a00fd4
commit 935069d68c
10 changed files with 302 additions and 139 deletions

16
app_inference.py Normal file
View File

@@ -0,0 +1,16 @@
from PytorchBoot.application import PytorchBootApplication
from runners.inferencer import Inferencer
@PytorchBootApplication("inference")
class InferenceApp:
@staticmethod
def start():
'''
call default or your custom runners here, code will be executed
automatically when type "pytorch-boot run" or "ptb run" in terminal
example:
Trainer("path_to_your_train_config").run()
Evaluator("path_to_your_eval_config").run()
'''
Inferencer("./configs/local/inference_config.yaml").run()