ADRIO.validate_result
*, expected_shape=None) adrio.adrio.ADRIO.validate_result(context, result,
Validates that the result produced by an ADRIO adheres to the declared result format.
NOTE: Implementations (that also implement inspect
) must call this method at the end of inspect
.
Parameters
context:
Context
-
The context in which the result has been evaluated.
result: NDArray[
ResultT
]-
The result produced by the ADRIO.
expected_shape: tuple[int, …] = None
-
Provide the expected absolute shape of the result array, if this cannot be calculated automatically. This is only needed for result DataShapes which have “arbitrary” axis lengths – that is lengths that can’t be determined from the properties of the context itself. In this case, the implementation should override this method, calculate the expected shape, and pass it to a call to
super()._validate_result(...)
.
Raises
Name | Type | Description |
---|---|---|
ADRIOProcessingError | If the result is invalid, indicating the processing logic has a bug. |