custom_lru_cache
remove_nans
self) by removing
NaN values.
This decorator processes each numpy array argument passed to the decorated
function by:
- Dropping rows that are entirely
NaNsin any of the arrays. - Dropping columns (after row filtering) that contain any
NaNsin any of the arrays.
numpy array arguments must have the same shape, otherwise a ValueError
is raised.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
func | tp.Callable | -- | The function whose numpy array arguments will be cleaned. |
| Type | Description |
|---|---|
ValueError | If not all numpy array arguments have the same shape. |
| Type | Description |
|---|---|
tp.Callable | A wrapped version of the input function with the NaNs cleaning logic applied. |
filter_config
Feature objects based on search terms
from the function signature.
The decorated method must take a search parameter (str or list of str)
and have access to self.feature. It filters the list by searching
within id (case-sensitive), study_name, and timeframe (case-insensitive)
attributes. Supports substring matching and prefix matching with trailing *.
Returns:
| Type | Description |
|---|---|
tp.Callable | Decorated function returning filtered list of Feature objects. |
catch_exceptions
Schedule library doesn’t catch exceptions that happen during job execution.
Therefore any exceptions thrown during job execution will bubble up and
interrupt schedule’s run_xyz function.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
cancel_on_failure | bool | False | If True, the job will be cancelled on failure, returning schedule.CancelJob. If False, the job will continue running even if an exception occurs. Defaults to False. |
| Type | Description |
|---|---|
tp.Callable | Decorated function allowing to catch exceptions. |
deprecated
DeprecationWarning is issued,
and a RuntimeError is raised to stop execution.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
reason | str | This... | A message indicating why the function is deprecated or what to use instead. Defaults to “This function is deprecated and has been disabled.” |
| Type | Description |
|---|---|
RuntimeError | Always raised when the decorated function is called to indicate it is disabled. |
| Type | Description |
|---|---|
callable | A wrapper function that issues a warning and raises an error when called. |

