Skip to content

Commit

Permalink
add new proposal of Cloud-Robotic AI Benchmarking for Edge-cloud Coll…
Browse files Browse the repository at this point in the history
…aborative Lifelong Learning

Signed-off-by: husj <[email protected]>

fix the bug of picture

Signed-off-by: husj <[email protected]>

Fix CI issue: Raising too general exception.

Signed-off-by: Jie Pu <[email protected]>

correct the description and the goal of this proposal

Signed-off-by: husj <[email protected]>

correct the content

Signed-off-by: husj <[email protected]>

add introduction for new test example

Signed-off-by: husj <[email protected]>

modify the description of test benchmark

Signed-off-by: husj <[email protected]>

Update Owners

Signed-off-by: Jie Pu <[email protected]>

update proposal

Signed-off-by: husj <[email protected]>

update some changes

Signed-off-by: husj <[email protected]>
  • Loading branch information
hsj576 committed May 19, 2023
1 parent ff87e50 commit 19c00cd
Show file tree
Hide file tree
Showing 23 changed files with 285 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/fossa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [ "3.6", "3.7", "3.8", "3.9" ]
python-version: [ "3.7", "3.8", "3.9" ]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
name: pylint
strategy:
matrix:
python-version: [ "3.6", "3.7", "3.8", "3.9" ]
python-version: [ "3.7", "3.8", "3.9" ]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand Down
7 changes: 4 additions & 3 deletions OWNERS
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
approvers:
- MooreZheng
- JimmyYang20
- sig-ai-co-chairs
- sig-ai-tech-leads

reviewers:
- MooreZheng
- JimmyYang20
- jaypume
- back1860
- luosiqi
- sig-ai-project-maintainers
10 changes: 10 additions & 0 deletions OWNERS_ALIASES
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
aliases:
sig-ai-co-chairs:
- MooreZheng
- xhken
sig-ai-tech-leads:
- jaypume
- Ratuchetp
sig-ai-project-maintainers:
- Poorunga
- MooreZheng
2 changes: 1 addition & 1 deletion core/cmd/benchmarking.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def main():

LOGGER.info("benchmarkingjob runs successfully.")
except Exception as err:
raise Exception(f"benchmarkingjob runs failed, error: {err}.") from err
raise RuntimeError(f"benchmarkingjob runs failed, error: {err}.") from err


def _generate_parser():
Expand Down
5 changes: 2 additions & 3 deletions core/cmd/obj/benchmarkingjob.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ def __init__(self, config):

def _check_fields(self):
if not self.name and not isinstance(self.name, str):
ValueError(f"algorithm name({self.name}) must be provided and be string type.")
raise ValueError(f"benchmarkingjob's name({self.name}) must be provided"
f" and be string type.")

Expand Down Expand Up @@ -114,13 +113,13 @@ def _parse_config(self, config: dict):

def _parse_testenv_config(self, config_file):
if not utils.is_local_file(config_file):
raise Exception(f"not found testenv config file({config_file}) in local")
raise RuntimeError(f"not found testenv config file({config_file}) in local")

try:
config = utils.yaml2dict(config_file)
self.test_env = TestEnv(config)
except Exception as err:
raise Exception(f"testenv config file({config_file}) is not supported, "
raise RuntimeError(f"testenv config file({config_file}) is not supported, "
f"error: {err}") from err

def _parse_rank_config(self, config):
Expand Down
6 changes: 3 additions & 3 deletions core/common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def py2dict(url):

return raw_dict

raise Exception('config file must be the py format')
raise RuntimeError('config file must be the py format')


def yaml2dict(url):
Expand All @@ -82,7 +82,7 @@ def yaml2dict(url):

return raw_dict

raise Exception('config file must be the yaml format')
raise RuntimeError('config file must be the yaml format')


def load_module(url):
Expand All @@ -96,4 +96,4 @@ def load_module(url):
importlib.import_module(module_name)
sys.path.pop(0)
except Exception as err:
raise Exception(f"load module(url={url}) failed, error: {err}") from err
raise RuntimeError(f"load module(url={url}) failed, error: {err}") from err
2 changes: 1 addition & 1 deletion core/storymanager/rank/rank.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,6 @@ def plot(self):
func = get_visualization_func(method)
func(self.selected_rank_file)
except Exception as err:
raise Exception(
raise RuntimeError(
f"process visualization(method={method}) of "
f"rank file({self.selected_rank_file}) failed, error: {err}.") from err
8 changes: 4 additions & 4 deletions core/testcasecontroller/algorithm/module/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def basemodel_func(self):
basemodel = ClassFactory.get_cls(type_name=ClassType.GENERAL,
t_cls_name=self.name)(**self.hyperparameters)
except Exception as err:
raise Exception(f"basemodel module loads class(name={self.name}) failed, "
raise RuntimeError(f"basemodel module loads class(name={self.name}) failed, "
f"error: {err}.") from err

return basemodel
Expand All @@ -114,7 +114,7 @@ def hard_example_mining_func(self):

return func
except Exception as err:
raise Exception(f"hard_example_mining module loads class"
raise RuntimeError(f"hard_example_mining module loads class"
f"(name={self.name}) failed, error: {err}.") from err

# call built-in hard example mining function
Expand Down Expand Up @@ -179,14 +179,14 @@ def _parse_other_hyperparameters(cls, config_files):
base_hps = {}
for hp_config_file in config_files:
if not utils.is_local_file(hp_config_file):
raise Exception(f"not found other hyperparameters config file"
raise RuntimeError(f"not found other hyperparameters config file"
f"({hp_config_file}) in local")

try:
other_hps = utils.yaml2dict(hp_config_file)
base_hps.update(**other_hps)
except Exception as err:
raise Exception(
raise RuntimeError(
f"other hyperparameters config file({hp_config_file}) is unvild, "
f"error: {err}") from err
return base_hps
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def _trigger_model_update(self, eval_results):
operator_func = operator_map[operator]

if len(eval_results) != 2:
raise Exception(f"two models of evaluation should have two results."
raise RuntimeError(f"two models of evaluation should have two results."
f" the eval results: {eval_results}")

metric_values = [0, 0]
Expand Down
2 changes: 1 addition & 1 deletion core/testcasecontroller/metrics/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,6 @@ def get_metric_func(metric_dict: dict):
metric_func = ClassFactory.get_cls(type_name=ClassType.GENERAL, t_cls_name=name)
return name, metric_func
except Exception as err:
raise Exception(f"get metric func(url={url}) failed, error: {err}.") from err
raise RuntimeError(f"get metric func(url={url}) failed, error: {err}.") from err

return name, getattr(sys.modules[__name__], str.lower(name) + "_func")
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ def check_host_docker():
if install_docker.returncode == 0:
LOGGER.info("successfully installed docker")
else:
raise Exception("install docker failed")
raise RuntimeError("install docker failed")
except Exception as err:
raise Exception(f"install docker failed, error: {err}.") from err
raise RuntimeError(f"install docker failed, error: {err}.") from err

LOGGER.info("check docker successful")

Expand Down Expand Up @@ -71,9 +71,9 @@ def check_host_kind():
LOGGER.info("successfully installed kind")
else:
LOGGER.exception("install kind failed")
raise Exception("install kind failed")
raise RuntimeError("install kind failed")
except Exception as err:
raise Exception(f"install kind failed, error: {err}.") from err
raise RuntimeError(f"install kind failed, error: {err}.") from err


def get_host_free_memory_size():
Expand Down Expand Up @@ -102,7 +102,7 @@ def check_host_memory():
"The current free memory is insufficient. \
Current Memory Free: %s kB, Memory Require: %s kB",
memory_free, memory_require)
raise Exception("The current free memory is insufficient.")
raise RuntimeError("The current free memory is insufficient.")


def get_host_number_of_cpus():
Expand Down Expand Up @@ -132,7 +132,7 @@ def check_host_cpu():
LOGGER.info(
"The number of cpus is insufficient. Number of Cpus: %s kB, Cpus Require: %s kB",
number_of_cpus, cpus_require)
raise Exception("The number os cpus is insufficient.")
raise RuntimeError("The number os cpus is insufficient.")


def check_host_enviroment():
Expand Down Expand Up @@ -169,7 +169,7 @@ def build_simulation_enviroment(simulation):
LOGGER.info(
"Congratulation! The simulation enviroment build successful!")
else:
raise Exception("The simulation enviroment build failed.")
raise RuntimeError("The simulation enviroment build failed.")


def destory_simulation_enviroment(simulation):
Expand Down
2 changes: 1 addition & 1 deletion core/testcasecontroller/testcase/testcase.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def run(self, workspace):

except Exception as err:
paradigm_type = self.algorithm.paradigm_type
raise Exception(
raise RuntimeError(
f"(paradigm={paradigm_type}) pipeline runs failed, error: {err}") from err
return test_result

Expand Down
6 changes: 3 additions & 3 deletions core/testcasecontroller/testcasecontroller.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def run_testcases(self, workspace):
try:
res, time = (testcase.run(workspace), utils.get_local_time())
except Exception as err:
raise Exception(f"testcase(id={testcase.id}) runs failed, error: {err}") from err
raise RuntimeError(f"testcase(id={testcase.id}) runs failed, error: {err}") from err

succeed_results[testcase.id] = (res, time)
succeed_testcases.append(testcase)
Expand All @@ -67,14 +67,14 @@ def _parse_algorithms_config(cls, config):
name = algorithm_config.get("name")
config_file = algorithm_config.get("url")
if not utils.is_local_file(config_file):
raise Exception(f"not found algorithm config file({config_file}) in local")
raise RuntimeError(f"not found algorithm config file({config_file}) in local")

try:
config = utils.yaml2dict(config_file)
algorithm = Algorithm(name, config)
algorithms.append(algorithm)
except Exception as err:
raise Exception(f"algorithm config file({config_file} is not supported, "
raise RuntimeError(f"algorithm config file({config_file} is not supported, "
f"error: {err}") from err

new_algorithms = []
Expand Down
2 changes: 1 addition & 1 deletion core/testenvmanager/testenv/testenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ def prepare(self):
try:
self.dataset.process_dataset()
except Exception as err:
raise Exception(f"prepare dataset failed, error: {err}.") from err
raise RuntimeError(f"prepare dataset failed, error: {err}.") from err
Loading

0 comments on commit 19c00cd

Please sign in to comment.