Skip to content

Commit bbdec48

Browse files
gustavocidornelaswhoseoyster
authored andcommitted
Pass on timestamps if they are also available in the dataset
1 parent 0d3b871 commit bbdec48

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

openlayer/model_runners/ll_model_runners.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ def _run_in_memory_and_yield_progress(
104104
output_value = input_data_row[output_column_name]
105105
if output_value is not None:
106106
model_outputs.append(output_value)
107+
if "output_time_utc" in input_data_row:
108+
timestamps.append(input_data_row["output_time_utc"])
109+
else:
110+
timestamps.append(datetime.datetime.utcnow().isoformat())
107111
current_row += 1
108112
yield pd.DataFrame(
109113
{"output": model_outputs, "output_time_utc": timestamps}

0 commit comments

Comments
 (0)