Add multi-label docs - #158
Merged
Merged
Conversation
There was a problem hiding this comment.
1 issue found across 3 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="CHANGELOG.md">
<violation number="1" location="CHANGELOG.md:56">
P1: The diff adds a second `## Unreleased` block and a second `## v0.14.0` block to the changelog, but both sections already exist in the file (the existing `## Unreleased` sits between the template and v0.14.0, and v0.14.0 already has the multi-label entries). This produces two unreleased sections and two v0.14.0 sections. Remove the duplicate insert and, if needed, add any new unreleased entries directly into the existing `## Unreleased` section.</violation>
</file>
Architecture diagram
sequenceDiagram
participant Node as Off-Chain Node
participant Chain as On-Chain (allora-chain)
participant WorkerSource as Inference Source (external)
participant ReputerSource as Ground Truth Source (external)
participant LossSvc as Loss Function Service
Note over Node: Startup Phase – per topic
Node->>Chain: Query TopicOutputArity for topicId
Chain-->>Node: arity = SINGLE | MULTI
alt arity == SINGLE
Node->>Node: Check InferenceEndpoint / GroundTruthEndpoint / LossFunctionService exist
opt LabeledInferenceEndpoint etc. also configured
Node->>Node: Log warning, ignore multi-label endpoints
end
alt Required scalar endpoint missing
Node->>Node: Fail fast (panic / error)
end
else arity == MULTI
Node->>Node: Check LabeledInferenceEndpoint / LabeledGroundTruthEndpoint / LabeledLossFunctionService exist
opt InferenceEndpoint etc. also configured
Node->>Node: Log warning, ignore scalar endpoints
end
alt Required labeled endpoint missing
Node->>Node: Fail fast (panic / error)
end
end
Note over Node: Per-Epoch Worker Flow
Note over Node: Worker – Inference
alt arity == SINGLE
Node->>WorkerSource: GET inference (InferenceEndpoint)
WorkerSource-->>Node: scalar value
Node->>Node: Increment allora_worker_inference_request_count
else arity == MULTI
Node->>WorkerSource: GET labeled inference (LabeledInferenceEndpoint)
WorkerSource-->>Node: JSON array [{label, value}, …]
Node->>Node: Increment allora_worker_labeled_inference_request_count (NEW metric)
end
Node->>Chain: Submit inference (scalar or labeled)
Note over Node: Per-Epoch Reputer Flow
Note over Node: Reputer – Ground Truth & Loss
alt arity == SINGLE
Node->>ReputerSource: GET ground truth (GroundTruthEndpoint)
ReputerSource-->>Node: scalar value
Node->>LossSvc: POST /calculate (LossFunctionService)
LossSvc-->>Node: loss value
else arity == MULTI
Node->>ReputerSource: GET labeled ground truth (LabeledGroundTruthEndpoint)
ReputerSource-->>Node: JSON array [{label, value}, …]
Node->>LossSvc: POST /calculate (LabeledLossFunctionService)
LossSvc-->>Node: loss value
end
Node->>Chain: Submit reputer value (scalar or labeled) and loss
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
zale144
approved these changes
Jul 13, 2026
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.
Purpose of Changes and their Description
Update docs and changelog wrt multi-label
Are these changes tested and documented?
Unreleasedsection ofCHANGELOG.md? -- added here the multi-label with releaseSummary by cubic
Docs update to explain multi-label (classification) support and how arity is decided by the topic’s on-chain output arity. Adds labeled worker/reputer config examples, request/response formats, the
allora_worker_labeled_inference_request_countmetric, and updates CHANGELOG with v0.14.0 and an Unreleased section.LabeledInferenceEndpoint,LabeledGroundTruthEndpoint, andLabeledLossFunctionService.InferenceEndpoint,GroundTruthEndpoint, andLossFunctionService.Written for commit 9ffce6d. Summary will update on new commits.