feat : add setup_logging with hierarchical astrai logger
- setup_logging(): attach handler only to astrai logger, not root - all astrai.* sub-module loggers inherit automatically - controlled by ASTR_LOG_LEVEL env var (default INFO) - called in if __name__ == '__main__' of each CLI script
This commit is contained in:
@@ -3,6 +3,7 @@ from pathlib import Path
|
||||
import click
|
||||
import torch
|
||||
|
||||
from astrai import setup_logging
|
||||
from astrai.inference import run_server
|
||||
|
||||
_DTYPES = ["bfloat16", "float16", "float32"]
|
||||
@@ -64,4 +65,5 @@ def server_command(
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
setup_logging()
|
||||
server_command()
|
||||
|
||||
Reference in New Issue
Block a user