Skip to content

Commit

Permalink
Merge pull request #4275 from nzw0301/skip-running-trial-for-constraint
Browse files Browse the repository at this point in the history
Skip constraint check for running trial
  • Loading branch information
knshnb committed Jan 5, 2023
2 parents 91f21fb + 001c8c8 commit 42493d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion optuna/samplers/_tpe/sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ def _get_observation_pairs(
param_value = None
values[param_name].append(param_value)

if constraints_enabled:
if constraints_enabled and trial.state != TrialState.RUNNING:
assert violations is not None
constraint = trial.system_attrs.get(_CONSTRAINTS_KEY)
if constraint is None:
Expand Down

0 comments on commit 42493d9

Please sign in to comment.