Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions .github/workflows/protected-tensor-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: protected-tensor-release
on:
workflow_dispatch:
inputs:
expected_sha:
description: Exact unchanged main SHA qualified on release/**
required: true
type: string
permissions:
contents: read
issues: read
actions: read
concurrency:
group: protected-registry-release
cancel-in-progress: false
jobs:
publish:
runs-on: ubuntu-24.04
timeout-minutes: 45
permissions:
contents: write
issues: read
actions: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0
with:
python-version: '3.12'
- uses: dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec
with:
toolchain: '1.99.1'
- name: Revalidate exact source and download the sealed pre-main candidate
env:
GH_TOKEN: ${{ github.token }}
EXPECTED_SHA: ${{ inputs.expected_sha }}
run: python3 scripts/tensor-release.py download --expected-sha "$EXPECTED_SHA" --directory "$RUNNER_TEMP/tensor-publication"
- name: Publish only the qualified immutable Cargo archive
env:
GH_TOKEN: ${{ github.token }}
EXPECTED_SHA: ${{ inputs.expected_sha }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: python3 scripts/tensor-release.py publish --expected-sha "$EXPECTED_SHA" --directory "$RUNNER_TEMP/tensor-publication"
- name: Verify canonical bytes and fresh public Cargo and CLI consumers without registry credentials
env:
GH_TOKEN: ${{ github.token }}
EXPECTED_SHA: ${{ inputs.expected_sha }}
run: python3 scripts/tensor-release.py verify-public --expected-sha "$EXPECTED_SHA" --directory "$RUNNER_TEMP/tensor-publication"
- name: Create exact-source release and verify every downloaded asset
env:
GH_TOKEN: ${{ github.token }}
EXPECTED_SHA: ${{ inputs.expected_sha }}
run: python3 scripts/tensor-release.py github-release --expected-sha "$EXPECTED_SHA" --directory "$RUNNER_TEMP/tensor-publication"
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9
if: always()
with:
name: tensor-publication-${{ github.sha }}
path: |
${{ runner.temp }}/tensor-publication/*.json
${{ runner.temp }}/tensor-publication/*.crate
${{ runner.temp }}/tensor-publication/fresh/*.log
${{ runner.temp }}/tensor-publication/release-assets/*
${{ runner.temp }}/tensor-publication/candidate/*.json
if-no-files-found: error
retention-days: 90
78 changes: 78 additions & 0 deletions .github/workflows/tensor-wsp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Tensor WSP checkpoint validation
on:
pull_request:
paths: ['crates/wsp-tensor/**', 'scripts/tensor-release.py', 'scripts/tests/test_tensor_release.py', '.github/workflows/tensor-wsp.yml', '.github/workflows/protected-tensor-release.yml']
push:
branches: [main, 'release/**']
paths: ['crates/wsp-tensor/**', 'scripts/tensor-release.py', 'scripts/tests/test_tensor_release.py', '.github/workflows/tensor-wsp.yml', '.github/workflows/protected-tensor-release.yml']
workflow_dispatch: {}
permissions:
contents: read
concurrency:
group: tensor-wsp-${{ github.ref }}
cancel-in-progress: true
jobs:
qualify:
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0
with:
python-version: '3.12'
- uses: dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec
with:
toolchain: '1.99.1'
components: clippy, rustfmt
- name: Install pinned MSRV and advisory tool
run: |
rustup toolchain install 1.81.0 --profile minimal
cargo install cargo-audit --version '=0.22.2' --locked
- name: Exercise release rejection guards
run: python3 -m unittest discover -s scripts/tests -p 'test_tensor_release.py' -v
- name: Seal source-bound archive after native, packed and independent CLI qualification
env:
EXPECTED_SHA: ${{ github.sha }}
run: python3 scripts/tensor-release.py seal --expected-sha "$EXPECTED_SHA" --directory "$RUNNER_TEMP/tensor-seal"
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9
with:
name: tensor-candidate-${{ github.sha }}
path: |
${{ runner.temp }}/tensor-seal/*.crate
${{ runner.temp }}/tensor-seal/*.json
${{ runner.temp }}/tensor-seal/*.log
if-no-files-found: error
retention-days: 90
- name: Preserve failing qualification logs
if: failure()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9
with:
name: tensor-failure-${{ github.sha }}
path: ${{ runner.temp }}/tensor-seal/*.log
if-no-files-found: ignore
portability:
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 20
defaults:
run:
working-directory: crates/wsp-tensor
shell: bash
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0
with:
python-version: '3.12'
- uses: dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec
with:
toolchain: '1.99.1'
- run: cargo test --locked --test checkpoints -- --test-threads=1
- run: cargo build --release --locked
- run: python3 scripts/e2e.py
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,19 @@ dependency pins. Examples below retain the corresponding runtime generations.

Each family has a defined scope. Forecasting currently implements a univariate RNN and simple baselines; LSTM/GRU forecasting architectures return unsupported errors. Agent assignment records scheduling decisions; external task execution depends on the integration you supply. CUDA translation emits source and does not execute a GPU kernel. The native OpenCV bridge calls an installed C++ library, while the portable packages implement a smaller set of operations.

## Edit Safetensors checkpoints in Rust

[`ruv-fann-wsp-tensor`](crates/wsp-tensor/README.md) provides a standalone Rust
library and CLI for bounded F32, F16 and BF16 checkpoint edits. It streams a private
copy, checks the exact baseline hash, applies at most 128 replacements, and restores
byte-identical originals from hash-bound rollback receipts. Existing files are never
overwritten. Install with `cargo install ruv-fann-wsp-tensor --version 0.1.0 --locked`.

This is an offline checkpoint utility. The accompanying paired PAN2 experiment
harness records input/output provenance; GPU generation and model quality gains
have not been validated. See its guide for limits, independent evaluation and
source/packed/public package verification.

## Weight-space programming in Node.js and browsers

A neural network's weights are the numbers that control how inputs become
Expand Down
4 changes: 4 additions & 0 deletions crates/wsp-tensor/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/target/
__pycache__/
*.safetensors
*.log
Loading
Loading