Skip to content

Commit

Permalink
tweak diagnostics change to mitigate test invalidations
Browse files Browse the repository at this point in the history
  • Loading branch information
ablaom committed Mar 14, 2024
1 parent 029a733 commit 542d81f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/composition/learning_networks/nodes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -150,17 +150,18 @@ function _apply(y_plus, input...; kwargs...)
try
(y.operation)(mach..., raw_args...)
catch exception
diagnostics = MLJBase.diagnostics(y, input...; kwargs...) # defined in sources.jl
if !isempty(mach)
@error "Failed "*
"to apply the operation `$(y.operation)` to the machine "*
"$(y.machine), which receives it's data arguments from one or more "*
"nodes in a learning network. Possibly, one of these nodes "*
"is delivering data that is incompatible with the machine's model.\n"
"is delivering data that is incompatible "*
"with the machine's model.\n"*diagnostics
else
@error "Failed "*

Check warning on line 162 in src/composition/learning_networks/nodes.jl

View check run for this annotation

Codecov / codecov/patch

src/composition/learning_networks/nodes.jl#L162

Added line #L162 was not covered by tests
"to apply the operation `$(y.operation)`."
"to apply the operation `$(y.operation)`."*diagnostics
end
@error diagnostics(y, input...; kwargs...) # defined in sources.jl
rethrow(exception)
end
end
Expand Down

0 comments on commit 542d81f

Please sign in to comment.