Higher Rank Features¶
- class vanguard.features.HigherRankFeatures(rank, **kwargs)[source]¶
Bases:
DecoratorMake a
GPControllercompatible with higher rank features.GPyTorch assumes that input features are rank-1 (vectors) and a variety of RuntimeErrors are thrown from different places in the code if this is not true. This decorator modifies the gp model class to make it compatible with higher rank features.
Warning
This decorator is EXPERIMENTAL. It may cause errors or give incorrect results, and may have breaking changes without warning.
- Example:
>>> @HigherRankFeatures(2) ... class NewController(GPController): ... pass
- Parameters:
- property safe_updates: dict[type, set[str]]¶
Get a dictionary (class -> set[names]) of overrides/new methods that we consider “safe”.
- verify_decorated_class(cls)[source]¶
Verify that a class can be decorated by this instance.
- Parameters:
- Raises:
TypeError – If cls is not a subclass of the framework_class.
TopmostDecoratorError – If cls is already decorated with a
TopMostDecorator.MissingRequirementsError – If cls is missing a required decorator.
- Return type: