Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Principle:Tensorflow Serving Version Policy Configuration

From Leeroopedia
Knowledge Sources
Domains Version_Management, Configuration
Last Updated 2026-02-13 17:00 GMT

Overview

A policy mechanism that determines which model versions are loaded and served based on configurable rules: latest N versions, all available versions, or specific version numbers.

Description

Version policies control which discovered model versions become active in TensorFlow Serving. Without a policy, only the latest version is served. Policies enable use cases like multi-version A/B testing, pinned deployment of specific versions, and gradual rollouts.

Three policy types are available:

  • Latest(num_versions) — Serve the N most recent versions (default: N=1)
  • All — Serve every version discovered on disk
  • Specific(versions) — Serve only the explicitly listed version numbers

The policy is enforced by FileSystemStoragePathSource, which filters discovered versions on disk before emitting them as aspired versions to the manager.

Usage

Configure version policies in the ModelConfig protobuf when you need to serve more than just the latest version. This is essential for canary deployments, rollback capability, and gradual traffic migration between versions.

Theoretical Basis

# Abstract policy logic (NOT real implementation)
discovered_versions = scan_filesystem(base_path)  # e.g., [1, 2, 3, 4, 5]

if policy == "latest":
    aspired = sorted(discovered_versions)[-num_versions:]  # e.g., [4, 5]
elif policy == "all":
    aspired = discovered_versions  # [1, 2, 3, 4, 5]
elif policy == "specific":
    aspired = [v for v in discovered_versions if v in specific_list]  # e.g., [2, 5]

manager.set_aspired_versions(aspired)

Related Pages

Implemented By

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment