Skip to content

Commit

Permalink
Merge branch 'main' into sergiym/svc/fs_token_auth
Browse files Browse the repository at this point in the history
  • Loading branch information
motus authored Jul 10, 2024
2 parents 9b65bd7 + 30dd2e8 commit 101b593
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mlos_bench/mlos_bench/storage/sql/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,9 @@ def _get_config_id(self, conn: Connection, tunables: TunableGroups) -> int:

def new_trial(self, tunables: TunableGroups, ts_start: Optional[datetime] = None,
config: Optional[Dict[str, Any]] = None) -> Storage.Trial:
ts_start = utcify_timestamp(ts_start or datetime.now(UTC), origin="local")
# MySQL can round microseconds into the future causing scheduler to skip trials.
# Truncate microseconds to avoid this issue.
ts_start = utcify_timestamp(ts_start or datetime.now(UTC), origin="local").replace(microsecond=0)
_LOG.debug("Create trial: %s:%d @ %s", self._experiment_id, self._trial_id, ts_start)
with self._engine.begin() as conn:
try:
Expand Down

0 comments on commit 101b593

Please sign in to comment.