From 8869979ffc2632214486b9218511cc9618d012ce Mon Sep 17 00:00:00 2001 From: Taekyung Heo <7621438+TaekyungHeo@users.noreply.github.com> Date: Thu, 9 May 2024 10:28:24 -0400 Subject: [PATCH] Rename *2chakra_converter to *_converter --- src/python/converter/converter.py | 8 ++++---- .../{pytorch2chakra_converter.py => pytorch_converter.py} | 2 +- .../{text2chakra_converter.py => text_converter.py} | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) rename src/python/converter/{pytorch2chakra_converter.py => pytorch_converter.py} (99%) rename src/python/converter/{text2chakra_converter.py => text_converter.py} (99%) diff --git a/src/python/converter/converter.py b/src/python/converter/converter.py index acc85dab..df65dae3 100644 --- a/src/python/converter/converter.py +++ b/src/python/converter/converter.py @@ -6,8 +6,8 @@ import traceback from logging import FileHandler -from .pytorch2chakra_converter import PyTorch2ChakraConverter -from .text2chakra_converter import Text2ChakraConverter +from .pytorch_converter import PyTorchConverter +from .text_converter import TextConverter def get_logger(log_filename: str) -> logging.Logger: @@ -52,12 +52,12 @@ def main() -> None: try: if args.input_type == "Text": - converter = Text2ChakraConverter( + converter = TextConverter( args.input_filename, args.output_filename, args.num_npus, args.num_passes, logger ) converter.convert() elif args.input_type == "PyTorch": - converter = PyTorch2ChakraConverter(args.input_filename, args.output_filename, logger) + converter = PyTorchConverter(args.input_filename, args.output_filename, logger) converter.convert() else: logger.error(f"{args.input_type} unsupported") diff --git a/src/python/converter/pytorch2chakra_converter.py b/src/python/converter/pytorch_converter.py similarity index 99% rename from src/python/converter/pytorch2chakra_converter.py rename to src/python/converter/pytorch_converter.py index 2c552cff..37224ae6 100644 --- a/src/python/converter/pytorch2chakra_converter.py +++ b/src/python/converter/pytorch_converter.py @@ -27,7 +27,7 @@ from .pytorch_node import PyTorchNode, PyTorchNodeType -class PyTorch2ChakraConverter: +class PyTorchConverter: """ Converter class for transforming PyTorch execution traces into Chakra format. diff --git a/src/python/converter/text2chakra_converter.py b/src/python/converter/text_converter.py similarity index 99% rename from src/python/converter/text2chakra_converter.py rename to src/python/converter/text_converter.py index 3c15c35b..1c229a02 100644 --- a/src/python/converter/text2chakra_converter.py +++ b/src/python/converter/text_converter.py @@ -50,7 +50,7 @@ def __init__(self, line: str) -> None: raise ValueError(f'Cannot parse the following layer -- "{line}"') -class Text2ChakraConverter: +class TextConverter: def __init__( self, input_filename: str, output_filename: str, num_npus: int, num_passes: int, logger: logging.Logger ) -> None: