Migration guide — v0.21.0¶
v0.21.0 removes the mutable trainer image constants gemma.DefaultImage and
litert.DefaultImage from ai/tiny. Callers pass a digest-pinned trainer
image in Options.Image instead.
Who is affected¶
Applications that reference gemma.DefaultImage or litert.DefaultImage.
Both constants were already deprecated. No image was published at either
reference, and NewTrainer rejected them unless AllowUnpinnedImage was set.
Code that names either constant no longer compiles.
Upgrade¶
Replace the constant with the digest-pinned reference of the trainer image you build and publish:
// before
opts := gemma.Options{Image: gemma.DefaultImage}
// after
opts := gemma.Options{Image: "ghcr.io/owner/trainer@sha256:<64 hex>"}
litert.Options changes the same way:
// before
opts := litert.Options{Image: litert.DefaultImage}
// after
opts := litert.Options{Image: "ghcr.io/owner/litert-trainer@sha256:<64 hex>"}
ai/tiny/trainers/README.md describes how to build the trainer images.
Other entries¶
The v0.21.0 changelog also lists breaking changes that already shipped in
earlier releases: the core/storage aliases (see
v0.18.0), the LiteRT classifier sidecar, chromedp v0.21.0 in
pdf, and stripe-go v87 in payments/stripe. Applications that already run
v0.20.0 need no further change for these.