Skip to content

Commit 5c308cc

Browse files
committed
update some formatting and lower linting standards even further
1 parent 75bd4a5 commit 5c308cc

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

.github/workflows/lint.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: pylint
3131
run: |
3232
# Enforce the absolute bare minimum
33-
pylint --fail-under=7 rocketsled
33+
pylint --fail-under=5 rocketsled
3434
- name: flake8
3535
run: |
3636
flake8 --version

rocketsled/examples/batch.py

+8-3
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,19 @@
3434
from rocketsled.task import OptTask
3535
from rocketsled.utils import split_xz
3636

37+
38+
# Choose whether to use the custom_batch_predictor
39+
# function or the inbuilt GaussianProcessRegressor
40+
USE_CUSTOM_PREDICTOR = False
41+
42+
3743
# Setting up the FireWorks LaunchPad
3844
launchpad = LaunchPad(name="rsled")
3945
opt_label = "opt_default"
4046
db_info = {"launchpad": launchpad, "opt_label": opt_label}
4147
x_dim = [(-5.0, 5.0), (-5.0, 5.0)]
4248
batch_size = 5
4349

44-
USE_CUSTOM_PREDICTOR = False
45-
4650

4751
@explicit_serialize
4852
class RosenbrockTask(FireTaskBase):
@@ -89,7 +93,8 @@ def custom_batch_predictor(XZ_explored, Y, x_dims, XZ_unexplored, batch_size=1):
8993

9094
# Custom predictor should return a list or tuple of choices if possible
9195
# i.e., all native python types if possible
92-
# Return only a list of batch_size best X guesses (or single X guess for non-batch)
96+
# Return only a list of batch_size best X guesses (or single X guess
97+
# for non-batch)
9398
# For example, if batch_size is 5, return 5 best guesses.
9499
return best_x_batch
95100

0 commit comments

Comments
 (0)