• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

AnimaLogica / ExZarr / 3b0e8e9f534c7782825dffda6ffb6d1dde97fa66-PR-314
82%
main: 82%

Build:
Build:
LAST BUILD BRANCH: ci/nonblocking_benchmarks
DEFAULT BRANCH: main
Ran 08 Oct 2026 08:44PM UTC
Jobs 1
Files 56
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

08 Oct 2026 08:41PM UTC coverage: 82.096% (+0.05%) from 82.047%
3b0e8e9f534c7782825dffda6ffb6d1dde97fa66-PR-314

Pull #314

github

thanos
Nx is the Elixir library for doing the same math across a whole grid of numbers at once, instead of looping in Elixir one element at a time.

You use it for:

- **Summaries** over an image, a table, or a cube of measurements: sum, mean, min, max
- **Linear algebra**: dot products and matrix multiplies
- **Training**: the prediction step and the gradient of a loss. Axon builds models on top of Nx
- **Compiled runs**: `defn` turns those expressions into CPU code, or GPU code through EXLA or Torchx

The grid stays in memory as a tensor: one binary buffer, a type such as `{:f, 32}`, and a shape. ExZarr does not run that math. It stores the bytes. `ExZarr.Nx` copies an array into a tensor when you want to compute, and copies a tensor back when you want to keep the result.

The getting-started section **What is Nx** now says this directly, without assuming you know NumPy.

`03_03_training_from_zarr.livemd` now explains each step before the code runs.

* **The dataset** is 64 rows of two features. The target is `2 * x0 + 1`. Column 1 is stored and does not enter that formula. Chunks of 16 match the batch size, so each step reads one chunk. The cell prints the first row `[0.0, 0.05]` and the first target `1.0`.
* **The model** is one dense layer: `y_hat = w0 * x0 + w1 * x1 + b`. A good fit is weights near `[2, 0]` and bias near `1`. The batch cell shows shapes `{16, 2}` and `{16, 1}`, and how that pair is wrapped as `%{"features" => x}` for Axon.
* **Training** is mean squared error and SGD for 3 passes of 4 batches, 12 updates from random weights. The two probe rows are `[0.0, 0.0]` and `[1.0, 0.0]`, whose line values are `1` and `3`. The notebook says those predictions move toward `1` and `3` and will not land on them after this short run.

The first target is stored as one column, so `y0[0]` has shape `{1}` and `Nx.to_number/1` rejects it. The cell now indexes that remaining column with `y0[0][0]` before converting to a number.
Pull Request #314: V1.3.0 - Nx support

32 of 36 new or added lines in 1 file covered. (88.89%)

4104 of 4999 relevant lines covered (82.1%)

1528.29 hits per line

Uncovered Changes

Lines Coverage ∆ File
4
91.92
-1.73% lib/ex_zarr/nx.ex
Jobs
ID Job ID Ran Files Coverage
1 3b0e8e9f534c7782825dffda6ffb6d1dde97fa66-PR-314.1 08 Oct 2026 08:44PM UTC 56
82.1
GitHub Action Run
Source Files on build 3b0e8e9f534c7782825dffda6ffb6d1dde97fa66-PR-314
  • Tree
  • List 56
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #314
  • PR Base - main (#B6837C36...)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc