Create and visualize workflows consisting of classes, functions, and resources; recognize hyperparameters when needed.
Project description
regime
The regime
library offers a precise framework to outline workflows consisting of classes, functions, and resources. The Regime
class uses Process
and Resource
objects to delineate the flow of algorithms and input or output byproducts. Process
objects, if inheriting from HyperparameterMeta
, can explicitly "tag" hyperparameters by using the hyperparameter
decorator; this allows for the clear separation of hyperparameters such as those found in experiments (e.g., alpha, beta) and ordinary arguments (e.g., dataset).
Special features available through regime
:
- Hyperparameter Recognition: We can always automatically determine what are the hyperparameters from a
Process
signature. In doing so, this allows us to know which arguments we can safely explore other values. - Hyperparameter Validation: Keeping up with hyperparameters for many processes can quickly become cumbersome - especially in complex workflows. To address this -
Regime
determines what hyperparameters must be defined to use the requiredProcess
objects, and checks that these are provided via adict
instance. Thisdict
follows a hierarchical structure that comes directly from Python modules' paths to ensure that hyperparameters remain unique and their purpose known (i.e., they are nested according to the exact location they are found). - Hyperparameter Logging: Often, hyperparameters require fine-tuning, and after an experiment is performed - if the results are ideal, we wish to store these values for later reuse. The hyperparameters used for a
Regime
object can easily be exported as .yaml files. - Workflow Visualization: Due to
Regime
's backend graph to implement the flow of data betweenProcess
instances, your program's workflow is readily able to be visualized by using theigraph
library! This allows you to dynamically create diagrams showcasing how your program's functions, classes, resources, etc. all interact with each other, and can serve as a form of additional real-time documentation (e.g., PDF file). - Process Inspection: The
Regime
class inherits from the features implemented in therough-theory
library. This enablesRegime
instances to leverage operations analyzing discernibility for complex analysis of workflows.
Incorporating regime
into your code is straightforward and requires minimal edits!
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.