Skip to content

Commit

Permalink
Address flake8 issues
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyas-arvindekar committed Jul 1, 2024
1 parent 3bf8523 commit 44762bd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
5 changes: 2 additions & 3 deletions pyext/src/compare_runs_v2_w_pyplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,8 @@ def plot_sterr(results: dict):
for run_set in results[parent]: # runset is res_01
log_evi = []
for run in results[parent][run_set]:
log_evi.append(
float(results[parent][run_set][run]["log_estimated_evidence"])
)
r_temp = results[parent][run_set][run]
log_evi.append(float(r_temp["log_estimated_evidence"]))
stderr_log_evi = np.std(log_evi) / (math.sqrt(len(log_evi)))
x_vals.append(run_set)
y_vals.append(stderr_log_evi)
Expand Down
9 changes: 7 additions & 2 deletions pyext/src/wrapper_v6.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ def run_nested_sampling(h_param_file, topology=True):
os.chdir(f"run_{run_id}")

if topology:
topf = f"topology{res.split('/')[-1].split('_')[-1]}.txt"
topf = f"topology{res.split('/')[-1].split('_')[-1]}\
.txt"
else:
topf = res.split("/")[-1].split("_")[-1]

Expand Down Expand Up @@ -246,7 +247,11 @@ def run_nested_sampling(h_param_file, topology=True):
if len(curr_faulty_runs) != 0:
for fr, p in curr_faulty_runs:
if p.returncode == 11:
print(f"Will relaunch ({fr[0].split('/')[-1]}, " f"run_{fr[1]})")
print(
f"Will relaunch \
({fr[0].split('/')[-1]}, "
f"run_{fr[1]})"
)
torun.append(fr)
elif p.returncode == 12:
print(
Expand Down

0 comments on commit 44762bd

Please sign in to comment.