sage.utils.decorators
Filename = decorators.py Description = Sage decorators
Created on 19/07/2024 at 10:20:58
__author__ = Narenraju Nagarajan __copyright__ = Copyright 2024, Sage __credits__ = nnarenraju __license__ = MIT Licence __version__ = 0.0.1 __maintainer__ = nnarenraju __affiliation__ = University of Glasgow __email__ = nnarenraju@gmail.com __status__ = inUsage
Github Repository: NULL
Documentation: NULL
Functions
|
Class decorator that prints a warning when an unreviewed model is instantiated. |
Module Contents
- unreviewed_model(cls)[source]
Class decorator that prints a warning when an unreviewed model is instantiated.
Wraps the class constructor so that a prominent notice is printed any time the decorated model is created. Used to flag experimental architectures that have not yet been validated on real data.
- Parameters:
cls (type) – The model class to wrap.
- Returns:
A replacement constructor that prints the warning before delegating to the original class.
- Return type:
callable