Skip to content

Commit

Permalink
Update optuna/storages/_journal/file.py
Browse files Browse the repository at this point in the history
Co-authored-by: Naoto Mizuno <gobou522@gmail.com>
  • Loading branch information
y0z and not522 committed Jan 26, 2024
1 parent b2e51bc commit d0d6ffa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion optuna/storages/_journal/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def read_logs(self, log_number_from: int) -> List[Dict[str, Any]]:
continue

# Ensure that each line ends with line separators (\n, \r\n)
if not line.endswith(b"\n"):
if not line.endswith(os.linesep.encode()):
last_decode_error = ValueError("Invalid log format.")
del self._log_number_offset[log_number + 1]
continue
Expand Down

0 comments on commit d0d6ffa

Please sign in to comment.