Skip to content

Commit

Permalink
Fix prediction_writer loop
Browse files Browse the repository at this point in the history
  • Loading branch information
bricewang committed Aug 30, 2024
1 parent 39e2134 commit 19c69b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cellarium/ml/callbacks/prediction_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def write_prediction(
os.makedirs(output_dir, exist_ok=True)
df = pd.DataFrame(prediction.cpu())
if fields is not None:
for field_name, field_data in fields:
for field_name, field_data in fields.items():
df.insert(0, field_name, field_data)
df.insert(0, "db_ids", ids)
output_path = os.path.join(output_dir, f"batch_{postfix}.csv")
Expand Down

0 comments on commit 19c69b5

Please sign in to comment.