Commit a467dc4d authored by Maxim Onciul's avatar Maxim Onciul
Browse files

rate int to float

parent f1b44600
......@@ -21,7 +21,7 @@ param_grid = ParameterGrid(
[
{
# "repeat": [0] * 3,
"num_runs": [50],
"num_runs": [2],
"k": ["8"],
# "m": ["64"],
"m": ["64"],
......@@ -29,7 +29,7 @@ param_grid = ParameterGrid(
"d": ["60"],
# "d": ["31", "25", "20"],
"rx": [0, 1],
"b": ["5"],
"b": ["0.5"],
# "b": ["0", "1", "5", "10", "20"],
"B": ["10"],
# "B": ["10", "20", "50"],
......@@ -42,7 +42,7 @@ param_grid = ParameterGrid(
"l": ["7"],
"d": ["110"],
"rx": [0, 1],
"b": ["5"],
"b": ["0.5"],
# "b": ["0", "1", "5", "10", "20"],
"B": ["10"],
# "B": ["10", "20", "50"],
......@@ -175,9 +175,11 @@ def run_no_code(clients: List[pxssh.pxssh], conf: Dict[str, str]):
t_end = time()
# subprocess.run(["sed", "1,200d", picocom_file])
with open(picocom_file, 'rb') as f:
energy = float(f.readlines()[-4].split()[1])
egy_file = f'{conf["logdir"]}/{conf["exp"]}_energy'
reduce_call = [ "/usr/bin/sh", "log_to_egy.sh", picocom_file, egy_file ]
subprocess.run(reduce_call)
with open(egy_file, 'rb') as f:
energy = float(f.read())
print(f"energy: {energy}")
return Run(
......@@ -237,9 +239,11 @@ def run_experiment(clients: List[pxssh.pxssh], conf: Dict[str, str]):
t_end = time()
# subprocess.run(["sed", "1,200d", picocom_file])
with open(picocom_file, 'rb') as f:
energy = float(f.readlines()[-4].split()[1])
egy_file = f'{conf["logdir"]}/{conf["exp"]}_energy'
reduce_call = [ "/usr/bin/sh", "log_to_egy.sh", picocom_file, egy_file ]
subprocess.run(reduce_call)
with open(egy_file, 'r') as f:
energy = float(f.read())
print(f"energy: {energy}")
return Run(
......
......@@ -42,7 +42,7 @@ def common() -> Dict[str, Any]:
parser.add_argument("d", type=int, help="polar d")
parser.add_argument("m", type=int, help="zfec m")
parser.add_argument("b", type=int, help="noise variance")
parser.add_argument("b", type=float, help="noise variance")
parser.add_argument("B", type=int, help="Block error rate")
parser.add_argument("num", type=int, help="num measure runs")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment