Version history tracking is **always active** — no configuration needed. Every `feast apply` that changes a feature view automatically records a version snapshot.
To enable **versioned online reads** (e.g., `fv@v2:feature`), add `enable_online_feature_view_versioning: true` to your registry config in `feature_store.yaml`:
To enable **versioned reads** (e.g., `fv@v2:feature`), add `enable_online_feature_view_versioning: true` to your registry config in `feature_store.yaml`:
```yaml
registry:
path: data/registry.db
enable_online_feature_view_versioning: true
```
When this flag is off, version-qualified refs (e.g., `fv@v2:feature`) in online reads will raise errors, but version history, version listing, version pinning, and version lookups all work normally.
Despite the `online` in its name, this flag gates **both** online (`get_online_features`) and offline (`get_historical_features`) versioned resolution — they share the same code path. When it is off, version-qualified refs (e.g., `fv@v2:feature`) raise errors, but version history, version listing, version pinning, and version lookups all work normally.
{% endhint %}
## Pinning to a Specific Version
Expand DownExpand Up
@@ -92,6 +92,50 @@ After reverting with a pin, you can go back to normal auto-incrementing behavior
| `"v0"`, `"v1"`, `"v2"`, ... | Pin to a specific version number |
| `"version0"`, `"version1"`, ... | Equivalent long form (case-insensitive) |
## Pinning a Version in a Feature Service
A `FeatureService` freezes the exact feature definitions a model was trained and
served on, so it can pin a specific historical feature view version. Two ways to
do this:
**1. String feature references (recommended).** A `FeatureService` entry may be a
string using the same `<feature_view>[@<version>][:<feature>]` syntax as
`get_historical_features`/`get_online_features`. No need to import or reconstruct
the historical feature view object — the pin is resolved against the registry at
`feast apply` time:
```python
from feast import FeatureService
pinned_service = FeatureService(
name="model_v1_service",
features=[
"driver_stats@v0:trips_today", # pinned version, single feature
"driver_stats@v1", # pinned version, whole view
"driver_stats", # latest (unpinned), whole view
],
)
```
**2. A version-pinned feature view object.** Passing a `FeatureView(version="v2")`
object (or a slice of it) into `features` carries its version into the service:
Either way, the resolved projection renders as `driver_stats@v2` and both online
(`get_online_features`) and offline (`get_historical_features`) retrieval return
the pinned snapshot instead of the promoted version. An unversioned entry
(`"driver_stats"` or a `version="latest"` object) behaves exactly as before.
Requires `enable_online_feature_view_versioning: true` (see
[Configuration](#configuration)); a pinned string ref only resolves once that
version exists in the registry's history.
## Staged Publishing (`--no-promote`)
By default, `feast apply` atomically saves a version snapshot **and** promotes it to the active definition. For breaking schema changes, you may want to stage the new version without disrupting unversioned consumers.
Expand DownExpand Up
@@ -223,7 +267,6 @@ ambiguity, the following characters are reserved and must not appear in feature
## Known Limitations
- **Online store coverage** — Version-qualified reads (`@v<N>`) are SQLite-only today. Other online stores are follow-up work.
- **Offline store versioning** — Versioned historical retrieval is not yet supported.
- **Offline store versioning** — Version-qualified historical retrieval (`get_historical_features`) is supported, including through a version-pinned feature service (see [Pinning a Version in a Feature Service](#pinning-a-version-in-a-feature-service)). It requires `enable_online_feature_view_versioning: true`.
- **Version deletion** — There is no mechanism to prune old versions from the registry.
- **Cross-version joins** — Joining features from different versions of the same feature view in `get_historical_features` is not supported.
- **Feature services** — Feature services always resolve to the active (promoted) version. `--no-promote` versions are not served until promoted.
The reason will be displayed to describe this comment to others. Learn more.
This mutates the source FeatureView's own projection. FeatureView(version="v2") does not set projection.version_tag itself, so after FeatureService(features=[fv]) the caller's fv.projection.version_tag becomes 2.
Online table naming (compute_versioned_name) reads that field, so a later materialize/get on the same object can unexpectedly hit *_v2. The string-ref path already copy.copys for this reason — please copy here too before stamping version_tag.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
The reason will be displayed to describe this comment to others. Learn more.
Docstring says apply/plan resolve these refs, but prepare_for_apply does not call resolve_pending_refs, and its early return is if self._features and all(p.features for p in self.feature_view_projections).
all([]) is True, so a service with only string refs and empty projections returns immediately. to_proto() then serializes zero features.
FeatureStore.apply happens to call this first, so the happy path is OK. Direct registry.apply_feature_service(...) or any proto round-trip before apply will persist an empty service with no error.
Please reject (or resolve) unresolved _pending_feature_refs in prepare_for_apply and to_proto().
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
The reason will be displayed to describe this comment to others. Learn more.
fvs_to_update_map only includes odfvs_to_write (write_to_online_store=True). A normal ODFV is absent, and _make_inferences runs before apply_feature_view, so the registry lookup fails too.
The reason will be displayed to describe this comment to others. Learn more.
Built a second map, fvs_to_resolve_map, that includes the full odfvs_to_update list (all ODFVs in the apply, write-enabled or not), and passed that to resolve_pending_refs. I left infer_features on the original fvs_to_update_map so inference/online-write behavior is untouched.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
""" bool: Enable versioned online store tables and version-qualified reads
(e.g., 'fv@v2:feature'). When True, each schema version gets its own
online store table and can be queried independently. Version history
tracking in the registry is always active regardless of this setting. """
""" bool: Enable versioned resolution of version-qualified feature references
(e.g., 'fv@v2:feature'). Despite the 'online' in its name, this flag gates
both online and offline (get_historical_features) versioned reads, which
share the same resolution path; when True, each schema version also gets
its own online store table and can be queried independently. Version
history tracking in the registry is always active regardless of this
setting. """
mcp: Optional[McpRegistryConfig] = None
""" McpRegistryConfig: MCP (Model Context Protocol) configuration for the registry REST server. """
Expand Down
Loading
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Loading
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.