Repository navigation
feat(predict): the self-exclusion rule reaches the search, so the query can go by accession - #1292
Merged
frapercan merged 2 commits intoNov 22, 2026
Conversation
…ry can go by accession Since protea-contracts #54 a predict payload can name how the query leaves its own neighbourhood: by sequence (the query and its twins, other proteins with the identical sequence) or by accession (the query alone, its twins kept as donors). protea-method applies either rule since its #67, but PROTEA only knew the flag, which means by sequence. The thesis closure frame excludes the protein itself and nothing else: an identical sequence carried by another protein is a legitimate donor, and retrieval should be the one to bring it. Both pre-searches, per aspect and unified, take their margin and their drop from protea-method's self_exclusion_margin and drop_self, through one view of the payload (predict_go_terms._self_exclusion), so they cannot disagree with the method's own search. The whole bank's sequence map is read only under the by-sequence rule, and a by-sequence payload without it is refused rather than silently dropping nothing. The coordinator forwards the rule to every batch and the method's configuration carries it. The receipt records whether the query was excluded, whichever field asked for it, and the rule when the payload named it. The rule is method identity in the seal, the arm identity names "self-excluded-by-accession", and the window summary and the panel tell an accession arm from a sequence arm of the same model. The flag alone behaves and records exactly as before.
…lf_exclusion protea-contracts f7008c90 (#54) names the rule. Every sibling that pins the contract moves with it, because Poetry cannot resolve two revisions of one git dependency: protea-method 69ea8af4 (#70), protea-sources f28af5b0 (#44), protea-runners c70335a7 (#32), protea-backends 1d0e5bc4 (#52) and protea-reranker-lab b296a3a7 (#125). Each moved only by its contract pin and one CI change, except protea-method, whose optional backends pin also moved to the revision PROTEA already pins (backends #47).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
self_exclusionis a field of the predict payloads since protea-contracts #54. With the value"accession", a run excludes the query from its own neighbourhood and nothing else: its twins (other proteins with the identical sequence) stay as donors. The flag alone keeps meaning"sequence", and it behaves and records exactly as before.One rule for both searches of a batch. The per-aspect and unified pre-searches take their margin and their drop from protea-method's
self_exclusion_marginanddrop_self, the functions the method's own search uses (_knn_step). Both read the payload through one view,predict_go_terms/_self_exclusion.py.The rule travels.
PredictConfigcarries it.The rule is recorded.
exclude_self_neighboursays whether the query was excluded, whichever field asked for it.self_exclusionis written when the payload named the rule, asfaissis._IDENTITY_META).The rule is shown.
self-excluded-by-accession.self by accession, shortacc) and never pairs it with a sequence arm of the same model (sameExclusion).Pins. The six sibling pins move together to the revisions that carry the new contract:
protea-contractstof7008c90(refactor(scoring): T2D.3 partial — extract compute-prediction-metrics helpers #54);protea-methodto69ea8af4(fix(ci): pr-update-on-develop uses a PAT so CI re-runs after auto-update #70);protea-sourcestof28af5b0(feat(services): F2D annotations CAFA-run + artifacts-zip extraction #44);protea-runnerstoc70335a7(feat(scripts): cafaeval-parity propagation for bootstrap_fmax_ci #32);protea-backendsto1d0e5bc4(refactor(scoring): T2D.3 partial — extract score-predictions-reranker helpers #52);protea-reranker-labtob296a3a7(docs(operations): correct compute_embeddings.batch_size default (8 -> 1) #125).Each sibling moves only by its contract pin and one CI change. The exception is
protea-method, whose optional backends pin also moves to the revision PROTEA already pins (feat(routers): split annotations.py into a 4-domain package (F2D AC met) #47).Why
The thesis closure frame excludes the protein itself and nothing else: "es esa proteina o no". An identical sequence carried by another protein is a legitimate donor, and retrieval should be the one to bring it. Until now PROTEA could only exclude by sequence, so every PLM arm of the 211->227 window lost those donors. The rule already existed in protea-method (#67) for the world model's dataset (ADR-D56); PROTEA had no way to ask for it.
How it was checked
TestByAccessionTheTwinsStaycovers both pre-search paths:self_exclusion_marginanddrop_selfin both pre-searches.ruff format,ruff check, smell budget, sets gate, OpenAPI references). mypy finds no issues in the changed modules. Web:vitest(panel),eslinton the changed files.