Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

Added appchain interaction #16

Closed
wants to merge 17 commits into from
Closed

Conversation

guilherme-brandao
Copy link
Contributor

No description provided.

Copy link
Contributor

@kpeluso kpeluso left a comment

Choose a reason for hiding this comment

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

Looking good! Mostly small things.

Obvi having this in WASM is ideal, but for what you set out to do / as a stepping stone, it's directionally ok.

return 0, err
}

return result.Ethereum["usd"], nil
Copy link
Contributor

Choose a reason for hiding this comment

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

in testing, you should be sure to check the units and decimals of the model. it's likely 0 decimals, a float, and usd, I don't know that with 100% certainty tho

cmd/node/appchain.go Outdated Show resolved Hide resolved

// Get lastest weight of each peer/worker
var workerLatestWeights map[string]float64 = make(map[string]float64)
for _, p := range workersPredictions {
Copy link
Contributor

Choose a reason for hiding this comment

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

note for v2: figure out how to do this in bulk

// Calculate the loss for each worker
losses := make(map[string]float64)
var scores []float64
for _, prediction := range workersPredictions {
Copy link
Contributor

Choose a reason for hiding this comment

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

at least for v2, add validation. it's an adversarial environment.

cmd/node/appchain.go Outdated Show resolved Hide resolved
@kpeluso
Copy link
Contributor

kpeluso commented Jan 12, 2024

Oh, also recall that for the correct implementation, we want to decouple weight adjustment from inference collection. for v0.1 I could go either way on this, but decoupled is the ideal

@dmikey
Copy link
Contributor

dmikey commented Jan 22, 2024

I think we can close this right? Most things have been included in the main, and I have a PR open for fluff. @guilherme-brandao ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants