Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Commit

Permalink
Improve logging
Browse files Browse the repository at this point in the history
  • Loading branch information
kubantjan committed Sep 8, 2022
1 parent f5dac07 commit 4516516
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 0 additions & 2 deletions shepherd/runner/base_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ def __init__(self, config_path: str, port: int, stream_name: str):
"""Create new :py:class:`Runner`."""
logging.info('Creating runner from `%s` listening on port %s', config_path, port)

self._logger = logging

# bind to the socket
self._port = port
self._socket = None
Expand Down
8 changes: 7 additions & 1 deletion shepherd/runner/runner_entry_point.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import asyncio
import importlib
import logging
import os
import sys
from argparse import ArgumentParser

__all__ = ['main']
from typing import Tuple, Optional

from shepherd.runner import BaseRunner

Expand Down Expand Up @@ -33,7 +35,11 @@ def main() -> None:

args = create_argparser().parse_args()

runner = BaseRunner(args.config_path, args.port, args.stream)
module_name = "model.isletnet_runner"
class_name = "IsletnetRunner"

_module = importlib.import_module(module_name)
runner = getattr(_module, class_name)(args.config_path, args.port, args.stream)

# listen for input messages
asyncio.run(runner.process_all())
Expand Down

0 comments on commit 4516516

Please sign in to comment.