Skip to content

Commit

Permalink
add remote reporter only if --lab is specified (#293)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #293

#291 (comment)

Reviewed By: sf-wind

Differential Revision: D15390774

fbshipit-source-id: 9e2e6c87d526a9949feae4a61faa86b15c42a9d3
  • Loading branch information
hl475 authored and facebook-github-bot committed May 21, 2019
1 parent db59201 commit 068f9f1
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" 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

0 comments on commit 068f9f1

Please sign in to comment.