extensions
Extra tools for supporting Rago.
Modules:
-
base–Extension base module.
-
cache–Cache backends for Rago steps.
-
logs–Logging configuration helpers for Rago pipelines.
Classes:
-
Cache–Abstract cache backend used by pipeline steps.
-
CacheFile–File-based cache backend implemented with joblib.
-
Logs–Attach a mutable log dictionary to a step.
Cache
Abstract cache backend used by pipeline steps.
Methods:
-
get_file_key–Normalize a cache key into a stable string representation.
-
load–Load cached data for the given key.
-
save–Persist data in the cache.
get_file_key
get_file_key(key: Any) -> str
Normalize a cache key into a stable string representation.
Source code in src/rago/extensions/cache.py
27 28 29 | |
load
abstractmethod
load(key: Any) -> Any
Load cached data for the given key.
Source code in src/rago/extensions/cache.py
19 20 21 | |
save
abstractmethod
save(key: Any, data: Any) -> None
Persist data in the cache.
Source code in src/rago/extensions/cache.py
23 24 25 | |
CacheFile
CacheFile(target_dir: Path | str)
Bases: Cache
File-based cache backend implemented with joblib.
Methods:
-
get_file_key–Normalize a cache key into a stable string representation.
-
get_file_path–Return the file path for a given cache key.
-
load–Load cached data if present.
-
save–Persist cached data to disk.
Source code in src/rago/extensions/cache.py
38 39 40 | |
get_file_key
get_file_key(key: Any) -> str
Normalize a cache key into a stable string representation.
Source code in src/rago/extensions/cache.py
27 28 29 | |
get_file_path
get_file_path(key: Any) -> Path
Return the file path for a given cache key.
Source code in src/rago/extensions/cache.py
42 43 44 | |
load
load(key: Any) -> Any
Load cached data if present.
Source code in src/rago/extensions/cache.py
46 47 48 49 50 51 | |
save
save(key: Any, data: Any) -> None
Persist cached data to disk.
Source code in src/rago/extensions/cache.py
53 54 55 56 | |
Logs
Logs(target: dict[str, Any] | None = None)
Bases: ParametersBase
Attach a mutable log dictionary to a step.
Methods:
-
apply–Merge additional configuration into this object.
-
process–Return the input unchanged for configuration-only objects.
Attributes:
-
params(dict[str, Any]) –Expose the underlying parameter mapping.
Source code in src/rago/extensions/logs.py
16 17 | |
params
property
params: dict[str, Any]
Expose the underlying parameter mapping.
apply
apply(parameters: Any) -> None
Merge additional configuration into this object.
Source code in src/rago/base.py
86 87 88 | |