Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🥅 Guardrail BBR only #1815

Draft
wants to merge 6 commits into
base: develop
Choose a base branch
from
Draft

🥅 Guardrail BBR only #1815

wants to merge 6 commits into from

Conversation

shnizzedy
Copy link
Member

@shnizzedy shnizzedy commented Oct 31, 2022

Fixes

Subset of #1789 / #1814
Related to FCP-INDI/TheWay#8 by @shnizzedy

Description

While #1814 (comment) is in progress, this PR implements guardrail + fallback functionality for BBR only.

Technical details

BBR guardrail strategy flowchart

Tests

Screenshots

Checklist

  • My pull request has a descriptive title (not a vague title like Update index.md).
  • My pull request targets the develop branch of the repository.
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I added tests for the changes I made (if applicable).
  • I updated the changelog.
  • I added or updated documentation (📝 Document registration guardrails fcp-indi.github.io#293, in progress)
  • I tried running the project locally and verified that there are no visible errors.

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

@shnizzedy
Copy link
Member Author

Not quite finished ― working on getting the short-circuit to work if we're retrying iff the first try fails

@shnizzedy
Copy link
Member Author

In pulling this out of #1789 / #1814, resolving merge conflicts and testing, I've discovered there's a lot of decision space in

# Runtime quality checks
guardrails:
# Minimum QC values to allow a run to complete post-registration
# Set any metric empty (like "Dice:") or to None to disable that guardrail
# Default thresholds adopted from XCP-Engine
# (https://github.com/PennLINC/xcpEngine/blob/397ab6cf/designs/cbf_all.dsn#L66)
thresholds:
Dice:
Jaccard:
CrossCorr:
Coverage:
# If this option is turned on and best_of is set to 1, any registration step that falls below the specified thresholds will retry with an incremented seed
retry_on_first_failure: Off
# If this number is > 1, C-PAC will run that many iterations of each registration calculation and choose the registration with the smallest difference from 1 across all specified thresholds
# If this number ≠ 1, the retry_on_first_failure option will have no effect
# Must be at least 1
best_of: 1

boundary_based_registration:
# this is a fork point
# run: [On, Off, fallback] - this will run both and fork the pipeline
# if 'fallback' is one of the selected options, BBR will run and, if its output fails quality_thresholds, the pipeline will fallback to BBR's input image
run: [Off]

Is

retry_on_first_failure
On Off
best_of
1>11
bbr On on 1 w/ retry on >1 on 1
Offoff
fallback fallback 1 w/ retryfallback  >1fallback 1

how we want these options to interact?

@shnizzedy shnizzedy changed the base branch from develop to develop-1.8.6 December 21, 2022 18:18
@shnizzedy shnizzedy added this to the 1.8.6 release milestone Dec 21, 2022
@nx10 nx10 changed the base branch from develop-1.8.6 to develop June 1, 2023 18:06
@shnizzedy shnizzedy removed this from the 1.8.6 release milestone Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants