Skip to content

Commit

Permalink
Explicitly add datetime format for parsing from log
Browse files Browse the repository at this point in the history
  • Loading branch information
PGijsbers committed Apr 9, 2023
1 parent ff740e5 commit 05c761a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gama/logging/GamaReport.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ def tuple_to_metrics(tuple_str):
return pd.Series([float(value) for value in tuple_str[1:-1].split(",")])

df[self.metrics] = df.score.apply(tuple_to_metrics)
df.start = pd.to_datetime(df.start) # needed?
df.start = pd.to_datetime(
df.start, format="%Y-%m-%d %H:%M:%S,%f"
) # needed?
df.duration = pd.to_timedelta(df.duration, unit="s")

new_individuals = {
Expand Down

0 comments on commit 05c761a

Please sign in to comment.