Skip to content

Fix: change call of on_end callback to pass output x of step#762

Merged
mrava87 merged 1 commit into
PyLops:devfrom
mrava87:fix-callback_on_end
Jun 26, 2026
Merged

Fix: change call of on_end callback to pass output x of step#762
mrava87 merged 1 commit into
PyLops:devfrom
mrava87:fix-callback_on_end

Conversation

@mrava87

@mrava87 mrava87 commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

This PR fixes how the callbacks on_end methods are called for the step method. Currently the first input of step is passed (i.e., the previous model) as args[0].

However, what the callback should be able to work on is the output of step (i.e., the new model), as ret or ret[0] for multiple outputs.

Note that whilst this is a breaking change, it is considered as a bug fix as having the previous model to do checks in callbacks is not ideal.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@mrava87 mrava87 self-assigned this Jun 26, 2026
@mrava87 mrava87 merged commit 2b51e18 into PyLops:dev Jun 26, 2026
21 checks passed
@mrava87 mrava87 deleted the fix-callback_on_end branch June 26, 2026 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant