Skip to content

Commit

Permalink
add remote reporter only if --lab is specified
Browse files Browse the repository at this point in the history
Summary: facebook#291 (comment)

Differential Revision: D15390774

fbshipit-source-id: a38e7ad6a4ba8b13fecd563bc52af5dc2c93838c
  • Loading branch information
hl475 authored and facebook-github-bot committed May 20, 2019
1 parent d850673 commit 5cdee63
Showing 1 changed file with 5 additions and 4 deletions.
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" 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

0 comments on commit 5cdee63

Please sign in to comment.