in benchmarking/driver/benchmark_driver.py [0:0]
def _retrieveMeta(info, benchmark, platform, framework, backend, user_identifier):
assert "treatment" in info, "Treatment is missing in info"
meta = {}
# common
meta["backend"] = backend
meta["time"] = time.time()
meta["framework"] = framework.getName()
meta["platform"] = platform.getName()
if platform.platform_hash:
meta["platform_hash"] = platform.platform_hash
meta["command"] = sys.argv
meta["command_str"] = getCommand(sys.argv)
if user_identifier:
meta["user_identifier"] = user_identifier
# model specific
if "model" in benchmark:
model = benchmark["model"]
meta["net_name"] = model["name"]
if "group" in benchmark["model"]:
meta["group"] = benchmark["model"]["group"]
# test specific
test = benchmark["tests"][0]
meta["metric"] = test["metric"]
if "identifier" in test:
meta["identifier"] = test["identifier"]
else:
meta["identifier"] = meta["net_name"]
# info specific
if "commit" in info["treatment"]:
meta["commit"] = info["treatment"]["commit"]
meta["commit_time"] = info["treatment"]["commit_time"]
if "control" in info:
meta["control_commit"] = info["control"]["commit"]
meta["control_commit_time"] = info["control"]["commit_time"]
if "run_type" in info:
meta["run_type"] = info["run_type"]
# Local run, user specific information
if "user" in info:
meta["user"] = info["user"]
return meta