We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aac3d1e commit c4bc3caCopy full SHA for c4bc3ca
1 file changed
code/logging_utils.py
@@ -1,5 +1,6 @@
1
import pandas as pd
2
import os
3
+from pandas.errors import EmptyDataError
4
5
6
def update_loss_log(
@@ -9,7 +10,10 @@ def update_loss_log(
9
10
Update the loss logs with a single dataset loss value.
11
"""
12
if os.path.exists(log_file_path):
- loss_logs_df = pd.read_csv(log_file_path)
13
+ try:
14
+ loss_logs_df = pd.read_csv(log_file_path)
15
+ except EmptyDataError:
16
+ loss_logs_df = pd.DataFrame()
17
18
new_row = {
19
"seed": seed,
0 commit comments