Feature Group Versioning

Overview

Feature Group versioning in mloda provides a way to track changes, manage compatibility, and aid debugging. This document explains how the versioning system works and how it's used in feature groups.

Key Concepts

Composite Version Identifier

The version identifier is generated by combining: - The version of the 'mloda' package - The module name where the feature group is defined - A SHA-256 hash of the feature group class's source code

This creates a unique identifier that represents the implementation state of the feature group.

The FeatureGroupVersion Class

The FeatureGroupVersion class handles the versioning logic:

@classmethod
def version(cls) -> str:
    """
    Returns a composite version identifier for this feature group.
    """
    return FeatureGroupVersion.version(cls)

Benefits

  • Change Detection: Easily detect when a feature group implementation has changed
  • Compatibility Management: Ensure compatibility between different versions
  • Debugging: Trace issues back to specific implementations
  • Reproducibility: Recreate results with the same feature group version