Files
modelscope/modelscope/cli/base.py
wenmeng.zwm 285208912b add command line tool
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/11661608

* add command line tool

* add unittest

* change absolute import to relative import for test case

* mv test_util to package
2023-02-20 21:21:54 +08:00

21 lines
404 B
Python

# Copyright (c) Alibaba, Inc. and its affiliates.
from abc import ABC, abstractmethod
from argparse import ArgumentParser
class CLICommand(ABC):
"""
Base class for command line tool.
"""
@staticmethod
@abstractmethod
def define_args(parsers: ArgumentParser):
raise NotImplementedError()
@abstractmethod
def execute(self):
raise NotImplementedError()