Skip to content

featurebyte.Feature.as_default_version

as_default_version( )

Description

When a feature has its default version mode set to manual, this method designates the Feature object as the default version for that specific feature. Note that the specified feature must be a version with the highest level of readiness. This method is used when there are other version that share the same level of readiness as the default version and the user wants to manually set the default version.

Each feature is recognized by its name and can possess numerous versions, though only a single default version is allowed.

The default version streamlines feature reuse by supplying the most suitable version when none is explicitly indicated. By default, the feature's default version mode is automatic, selecting the version with the highest readiness level as the default. If several versions share the same readiness level, the most recent one becomes the default.

Examples

>>> feature = catalog.get_feature("InvoiceCount_60days")
>>> feature.update_default_version_mode(fb.DefaultVersionMode.MANUAL)
>>> feature.as_default_version()