Unverified Commit 62a29134 authored by Yuting Jiang's avatar Yuting Jiang Committed by GitHub
Browse files

Executor - Support SuperBench Executor running on Windows (#475)

**Description**
Support SuperBench Executor running on Windows.

**Major Revision**
- Lazy import ansible related module
parent f21bfef2
......@@ -50,3 +50,16 @@ def __dir__(self):
"""
self._import()
return dir(self._module)
def __call__(self, *args, **kwargs):
"""Override __call__.
Args:
*args (list): Arguments.
**kwargs (dict): Keyword arguments.
Returns:
Any: The return value of the function.
"""
self._import()
return self._module(*args, **kwargs)
......@@ -3,9 +3,11 @@
"""SuperBench runner module."""
from superbench.runner.ansible import AnsibleClient
from superbench.common.utils.lazy_import import LazyImport
from superbench.runner.runner import SuperBenchRunner
AnsibleClient = LazyImport('superbench.runner.ansible', 'AnsibleClient')
__all__ = [
'AnsibleClient',
'SuperBenchRunner',
......
......@@ -16,10 +16,12 @@
from omegaconf import ListConfig, OmegaConf
from superbench.common.utils import SuperBenchLogger, logger, gen_ibstat, gen_traffic_pattern_host_groups
from superbench.runner.ansible import AnsibleClient
from superbench.common.utils.lazy_import import LazyImport
from superbench.benchmarks import ReduceType, Reducer
from superbench.monitor import MonitorRecord
AnsibleClient = LazyImport('superbench.runner.ansible', 'AnsibleClient')
class SuperBenchRunner():
"""SuperBench runner class."""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment