Skip to content

Commit

Permalink
pass uid to default_validate_shape
Browse files Browse the repository at this point in the history
  • Loading branch information
gwbischof committed Oct 29, 2024
1 parent 86cd7fd commit 81c122b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion databroker/mongo_normalized.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import copy
from datetime import datetime, timedelta
import functools
import inspect
import itertools
import logging
import os
Expand Down Expand Up @@ -932,6 +933,9 @@ def populate_columns(keys, min_seq_num, max_seq_num):
map(
lambda item: self.validate_shape(
key, numpy.asarray(item), expected_shape
) if 'uid' in inspect.signature(self.validate_shape).parameters
else self.validate_shape(
key, numpy.asarray(item), expected_shape, uid=self._run.metadata()['start']['uid']
),
result[key],
)
Expand Down Expand Up @@ -2245,7 +2249,7 @@ def default_validate_shape(key, data, expected_shape, uid=None):

logger.warning(f"The data.shape: {data.shape} did not match the expected_shape: "
f"{expected_shape} for key: '{key}'. This data has been zero-padded "
"to match the expected_shape!")
"to match the expected_shape! RunStart UID: {uid}")

return padded

Expand Down

0 comments on commit 81c122b

Please sign in to comment.