Flows are comprised of Steps, which can be thought of as a component of a Workflow.
For example, if a workflow consists of (1) connecting to a database to retrieve a dataset, (2) performing a series of operations on the dataset, and (3) generating a report with the processed data, you would write a Flow with three Steps.
Steps (operations run on the backend) map directly to Pages (what a user sees) in Virtualitics Predict. On the technical side, Steps are defined by their run()
method.
The run()
method is called to prepare Page Elements that will be used to populate the Page associated with a given Step.
Refer to the Virtualitics SDK for more information on run()
.
Related Articles:
Exploring Steps
Analytic workflows may be logically deconstructed into steps. In the same way, Flows may be logically deconstructed and organized into Steps in Virtualitics Predict.
Here are a few things to keep in mind:
- It is not possible to write a Flow without Steps. A Flow must contain at least one Step.
- Both backend and frontend operations may be included in Steps.
- Steps add interactivity and allow users to run Flows without staring at a blank screen wondering what is happening in the background.
- Steps can simplify debugging during the Flow-writing process.
- It is common practice in software development to break code into smaller units (classes, functions) that are easier to test (e.g., with unit testing).
- In the same way, it’s easier to identify where errors are coming from if a Flow is split into multiple aptly-named Steps.
Here is an example of how Steps may be used in a Flow:
- You are a machine learning engineer working for a company that provides a subscription service.
- You have been tasked with developing a Flow in which you predict the likelihood that a subscriber will churn (i.e., cancel their membership).
- Your Flow will be used by those with (data scientists, machine learning engineers, etc.) and without (customer retention specialists, business analysts, etc.) ML expertise.
- In your Flow, you must:
- Connect to multiple databases (and allow a user to specify query parameters),
- Merge data from each database (and allow a user to inspect the merged dataset),
- Train a machine learning model to predict churn likelihood (but allow a user to specify what hyperparameters to use in the ML model),
- Generate a report highlighting the performance of your model on historical data (and allow a user to download the report with a single click),
- Generate a list of subscribers who are most at risk to churn (also downloadable with a single click), and
- Provide interactive tools to allow customer retention specialists to probe your ML model (which requires access to your trained model and embedded AI tools).
- Each bullet in the preceding section should be implemented as a Step within a Flow.
- Both backend and frontend operations can be contained in each Step.
- Without Steps, it would not be possible to present steps within the workflow in consumable parts. Presumably, implementing the workflow in a single step would be challenging to develop and test.
Previous Article |
Next Article |