Skip to content

Commit c30ccb7

Browse files
committed
autoformat
1 parent 5d55c79 commit c30ccb7

20 files changed

Lines changed: 20 additions & 8 deletions

libensemble/gen_funcs/aposmm_localopt_support.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
This module contains methods for APOSMM to interface with various local
33
optimization routines.
44
"""
5+
56
__all__ = [
67
"LocalOptInterfacer",
78
"run_local_nlopt",

libensemble/gen_funcs/persistent_aposmm.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
This implementation of APOSMM was developed by Kaushik Kulkarni and Jeffrey
77
Larson in the summer of 2019.
88
"""
9+
910
__all__ = ["aposmm", "initialize_APOSMM", "decide_where_to_start_localopt", "update_history_dist"]
1011

1112
from math import log, pi, sqrt

libensemble/gen_funcs/persistent_ax_multitask.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
This `gen_f` is meant to be used with the `alloc_f` function
99
`only_persistent_gens`
1010
"""
11+
1112
import os
1213
from copy import deepcopy
1314

libensemble/gen_funcs/persistent_gpCAM.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
import time
44

55
import numpy as np
6-
from numpy.lib.recfunctions import repack_fields
76
from gpcam import GPOptimizer as GP
7+
from numpy.lib.recfunctions import repack_fields
88

99
from libensemble.message_numbers import EVAL_GEN_TAG, FINISHED_PERSISTENT_GEN_TAG, PERSIS_STOP, STOP_TAG
1010
from libensemble.tools.persistent_support import PersistentSupport
@@ -38,14 +38,14 @@ def _initialize_gpcAM(user_specs, libE_info):
3838

3939
def _read_testpoints(U):
4040
"""Read numpy file containing evaluated points for measuring GP error"""
41-
test_points_file = U.get('test_points_file')
41+
test_points_file = U.get("test_points_file")
4242
if test_points_file is None:
4343
return None
4444

4545
test_points = np.load(test_points_file)
4646

4747
# Remove any NaNs
48-
nan_indices = [i for i, fval in enumerate(test_points['f']) if np.isnan(fval)]
48+
nan_indices = [i for i, fval in enumerate(test_points["f"]) if np.isnan(fval)]
4949
test_points = np.delete(test_points, nan_indices, axis=0)
5050

5151
# In case large fields we don't need
@@ -103,7 +103,7 @@ def _update_gp_and_eval_var(all_x, all_y, x_for_var, test_points, persis_info):
103103

104104
if test_points is not None:
105105
f_est = my_gp2S.posterior_mean(test_points["x"])["f(x)"]
106-
mse = np.mean((f_est - test_points["f"])**2)
106+
mse = np.mean((f_est - test_points["f"]) ** 2)
107107
persis_info.setdefault("mean_squared_error", []).append(mse)
108108
return np.array(var_vals)
109109

libensemble/gen_funcs/sampling.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
use (and return) a random stream in ``persis_info``, given by the allocation
44
function.
55
"""
6+
67
import numpy as np
78

89
from libensemble.specs import output_data

libensemble/gen_funcs/surmise_calib_support.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Contains supplemental methods for gen function in persistent_surmise_calib.py."""
2+
23
import numpy as np
34
import scipy.stats as sps
45

libensemble/gen_funcs/ytopt_asktell.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
This module wraps around the ytopt generator.
33
"""
4+
45
import numpy as np
56

67
from libensemble.message_numbers import EVAL_GEN_TAG, FINISHED_PERSISTENT_GEN_TAG, PERSIS_STOP, STOP_TAG

libensemble/history.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414

1515
class History:
16-
1716
"""The History class provides methods for managing the history array.
1817
1918
**Object Attributes:**

libensemble/resources/rset_resources.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class RSetResources:
2626
rset_dtype = [
2727
("group", int), # Group ID this resource set belongs to
2828
("slot", int), # Slot ID this resource set belongs to
29-
("gpus", bool) # Does this resource set have GPUs
29+
("gpus", bool), # Does this resource set have GPUs
3030
# ('pool', int), # Pool ID (eg. separate gen/sim resources) - not yet used.
3131
]
3232

libensemble/sim_funcs/branin/branin_obj.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Calls the branin function. Default behavior uses the python function, but
33
uncommenting lines will write x.in to file, call branin.py, and then read f.out.
44
"""
5+
56
import time
67

78
import numpy as np

0 commit comments

Comments
 (0)