Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add remote reporter only if --lab is specified #293

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions benchmarking/run_bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,15 @@ def __init__(self, raw_args=None):

def run(self):
raw_args = self._getRawArgs()
if "--remote" in raw_args:
if "--remote" in raw_args or "--lab" in raw_args:

# server address must start with http
assert "--server_addr" in raw_args
idx = raw_args.index("--server_addr")
assert raw_args[idx+1].startswith("http") or len(raw_args[idx+1]) == 0
assert raw_args[idx + 1].startswith("http") or len(raw_args[idx + 1]) == 0
if "--lab" in raw_args and "--remote_reporter" not in raw_args:
raw_args.extend(["--remote_reporter",
raw_args["--server_addr"] + "/benchmark/store-result|oss"])
app = self.repoCls(raw_args=raw_args)
ret = app.run()
if "--query_num_devices" in self.unknowns:
Expand Down Expand Up @@ -117,8 +120,6 @@ def _saveDefaultArgs(self, new_args):

def _askArgsFromUser(self, args, new_args):
args.update(new_args)
if "--server_addr" in args and "--remote_reporter" not in args:
args["--remote_reporter"] = args["--server_addr"] + "/benchmark/store-result|oss"
self._inputOneRequiredArg(
"Please enter the directory the framework repo resides",
"--repo_dir", args)
Expand Down