Skip to content

feat(wasm): bind task-local training losses - #25

Draft
GBeurier wants to merge 1 commit into
agent/loss-runtime-completionfrom
agent/loss-cabi-controller-binding
Draft

feat(wasm): bind task-local training losses#25
GBeurier wants to merge 1 commit into
agent/loss-runtime-completionfrom
agent/loss-cabi-controller-binding

Conversation

@GBeurier

Copy link
Copy Markdown
Owner

Summary

  • bind JavaScript-local training losses directly from native DAG-ML NodeTask requirements
  • return a typed TrainingLossBinding containing the local function and exact required attestation JSON
  • reject PREDICT, attestation drift, descriptor mismatch, out-of-range roles, lossy numbers, and coercible non-number indices
  • document controller-side ownership and extend Node 20/22 WASM smoke coverage

Stack

Validation

  • cargo fmt --all --check
  • cargo test -p dag-ml-wasm (5 passed)
  • cargo clippy -p dag-ml-wasm --all-targets -- -D warnings
  • wasm-pack build crates/dag-ml-wasm --target nodejs --out-dir target/wasm/dag-ml-wasm --release
  • generated .d.ts verified as bind_training_loss(...): TrainingLossBinding with role_index: number
  • independent review: no findings after two correction rounds

Local limitation

Node is not installed in the local environment, so scripts/smoke_wasm_bindings.cjs is delegated to the repository Node 20/22 CI matrix.

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.

1 participant