-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from RapidAI/adapt_onnx_gpu_inference
feat: adapt for onnx-gpu
- Loading branch information
Showing
5 changed files
with
292 additions
and
67 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
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
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# -*- encoding: utf-8 -*- | ||
# @Author: Jocker1212 | ||
# @Contact: [email protected] | ||
import logging | ||
from functools import lru_cache | ||
|
||
|
||
@lru_cache(maxsize=32) | ||
def get_logger(name: str) -> logging.Logger: | ||
logger = logging.getLogger(name) | ||
logger.setLevel(logging.DEBUG) | ||
|
||
fmt = "%(asctime)s - %(name)s - %(levelname)s: %(message)s" | ||
format_str = logging.Formatter(fmt) | ||
|
||
sh = logging.StreamHandler() | ||
sh.setLevel(logging.DEBUG) | ||
|
||
logger.addHandler(sh) | ||
sh.setFormatter(format_str) | ||
return logger |
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.