Skip to content

Add multi-label docs - #158

Merged
xmariachi merged 1 commit into
devfrom
diego/docs-multi-label-changelog
Jul 13, 2026
Merged

Add multi-label docs#158
xmariachi merged 1 commit into
devfrom
diego/docs-multi-label-changelog

Conversation

@xmariachi

@xmariachi xmariachi commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator

Purpose of Changes and their Description

Update docs and changelog wrt multi-label

Are these changes tested and documented?

  • [] If tested, please describe how. If not, why tests are not needed. -- no need: just docs change
  • If documented, please describe where. If not, describe why docs are not needed. -- yes, this is docs change
  • Added to Unreleased section of CHANGELOG.md? -- added here the multi-label with release

Summary 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_count metric, and updates CHANGELOG with v0.14.0 and an Unreleased section.

  • Migration
    • MULTI topics require LabeledInferenceEndpoint, LabeledGroundTruthEndpoint, and LabeledLossFunctionService.
    • SINGLE topics require InferenceEndpoint, GroundTruthEndpoint, and LossFunctionService.
    • The node fails fast if required endpoints for the topic’s arity are missing; endpoints for the other arity are ignored with a warning.

Written for commit 9ffce6d. Summary will update on new commits.

Review in cubic

@xmariachi xmariachi changed the title Add docs Add multi-label docs Jul 12, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Loading

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread CHANGELOG.md
@xmariachi
xmariachi merged commit a9f7cd2 into dev Jul 13, 2026
3 checks passed
@xmariachi
xmariachi deleted the diego/docs-multi-label-changelog branch July 13, 2026 09:51
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.

2 participants