Skip to content

Commit

Permalink
style: Fix pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
eddiebergman committed Nov 28, 2024
1 parent 9df0351 commit 115dc9b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
7 changes: 3 additions & 4 deletions neps/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,8 +515,7 @@ def _launch_runtime( # noqa: PLR0913
)
shutil.rmtree(optimization_dir)

retry_count = 0
for retry_count in range(N_FAILED_CREATE_LOAD_STATE_ATTEMPTS):
for _retry_count in range(N_FAILED_CREATE_LOAD_STATE_ATTEMPTS):
try:
neps_state = create_or_load_filebased_neps_state(
directory=optimization_dir,
Expand All @@ -534,7 +533,7 @@ def _launch_runtime( # noqa: PLR0913
),
)
break
except Exception as e:
except Exception: # noqa: BLE001
time.sleep(0.5)
logger.debug(
"Error while trying to create or load the NePS state. Retrying...",
Expand All @@ -543,7 +542,7 @@ def _launch_runtime( # noqa: PLR0913
else:
raise RuntimeError(
"Failed to create or load the NePS state after"
f" {retry_count} attempts. Bailing!"
f" {N_FAILED_CREATE_LOAD_STATE_ATTEMPTS} attempts. Bailing!"
" Please enable debug logging to see the errors that occured."
)

Expand Down
3 changes: 2 additions & 1 deletion neps/state/neps_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ def sample_trial(
for hook in _sample_hooks:
optimizer = hook(optimizer)

# NOTE: Re-work this, as the part's that are recomputed do not need to be serialized
# NOTE: Re-work this, as the part's that are recomputed
# do not need to be serialized
budget = opt_state.budget
if budget is not None:
budget = budget.clone()
Expand Down

0 comments on commit 115dc9b

Please sign in to comment.