Skip to content

Commit 60e2bfe

Browse files
authored
Merge pull request #46 from amcaar/main
Updated version of Node-RED post
2 parents a060277 + 194b13c commit 60e2bfe

File tree

2 files changed

+43
-29
lines changed

2 files changed

+43
-29
lines changed

content/english/blog/post-elyra-egi-notebook.md

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,46 +11,55 @@ description: "A step-by-step guide to using Elyra within EGI Notebooks to intera
1111
draft: false
1212
---
1313

14+
In this post, we will learn about composing AI inference workflows by invoking OSCAR services with Elyra. This tool is an extension for Jupyter Notebooks and facilitates the graphical composition of pipelines, which allows us to easily compose a pipeline involving different OSCAR services. For that, we have recovered the next video demo that we invite you to watch. These developments are part of [AI4-Compose](https://github.com/ai4os/ai4-compose), a component of the [AI4OS](https://ai4os.eu) stack, created in the [AI4EOSC](https://ai4eosc.eu/) project.
15+
1416
{{< youtube 1pFjs0LND4E >}}
1517

1618

17-
# What is Elyra and EGI Notebooks?
19+
## About Elyra and EGI Notebooks
1820

1921
![Elyra Icon](../../images/blog/post-elyra-egi-notebooks/elyra_icon_1.png)
2022

21-
[Elyra](https://elyra.readthedocs.io/en/latest/index.html) is an open-source extension for [Jupyter Notebooks](https://jupyter.org/), designed to enhance the workflow of AI projects by supporting machine learning pipelines visually. It integrates seamlessly with various systems for orchestrating workflows, allowing users to create, run, and monitor their workflows within Jupyter environments. [EGI Notebooks](https://notebooks.egi.eu/hub/welcome), provided by the EGI cloud services, offer a cloud-based environment for running Jupyter Notebooks. This service simplifies the deployment and scaling of computational notebooks, providing researchers with powerful computational resources and a collaborative space for their scientific inquiries.
23+
Let's start by knowing a bit more about Elyra and EGI Notebooks, the service used in the video demo that provides users with a Jupyter Notebooks environment.
24+
25+
[Elyra](https://elyra.readthedocs.io/en/latest/index.html) is an open-source extension for [Jupyter Notebooks](https://jupyter.org/), designed to enhance the workflow of AI projects by supporting machine learning pipelines visually. It integrates seamlessly with various systems for orchestrating workflows, allowing users to create, run, and monitor their workflows within Jupyter environments. This tool is available inside [EGI Notebooks](https://notebooks.egi.eu/hub/welcome), a service provided by the EGI cloud services that offer a cloud-based environment for running Jupyter Notebooks. This service simplifies the deployment and scaling of computational notebooks, providing researchers with powerful computational resources and a collaborative space for their scientific inquiries.
26+
27+
Invoking OSCAR services through Elyra allows users to graphically compose AI model inference pipelines. Let's learn more about how Elyra works.
2228

2329

24-
# How a workflow in Elyra works?
30+
## How does a workflow in Elyra work?
2531

2632
In Elyra, a workflow is a set of nodes or steps, each representing a script or notebook, connected in a flow that defines the execution order. Users can drag and drop nodes to create a visual representation of their workflow. Each node can be configured with specific parameters, inputs, and outputs. When a pipeline is run, Elyra executes the nodes sequentially or in parallel, depending on their dependencies. This visual approach not only simplifies the understanding and editing of machine learning workflows but also integrates with platforms like Kubeflow Pipelines and Apache Airflow to manage the execution in scalable environments.
2733

2834
![Elyra Pipeline 1](../../images/blog/post-elyra-egi-notebooks/others_examples_1.png)
2935

30-
![Elyra Pipeline 2](../../images/blog/post-elyra-egi-notebooks/others_examples_2.png)
36+
In the context of the [AI4EOSC](https://ai4eosc.eu/) project, we have developed a set of recipes and nodes to simplify the execution of the AI model on its inference phase, that is previously created as a service on a remote OSCAR cluster. The examples that you see in the images above ("OSCAR Plants" and "OSCAR Gravify" boxes) and in the video demo can be found in the [AI4Compose repository](https://github.com/ai4os/ai4-compose/tree/main/elyra/examples). Some of the nodes correspond with a model available for inference in the AI4EOSC Marketplace, like, for example, the [Plants Species Classifier](https://dashboard.cloud.ai4eosc.eu/marketplace/modules/deep-oc-plants-classification-tf).
3137

38+
The easiest way to start testing the Elyra environment is to log in to EGI Notebooks and clone our AI4Compose repo with the examples and nodes, as shown in the video. Once done, you can start creating your own pipeline and add nodes that directly interact with an OSCAR cluster to invoke an already-defined OSCAR Service.
3239

33-
# Deploying a pipeline
40+
![Elyra Pipeline 2](../../images/blog/post-elyra-egi-notebooks/others_examples_2.png)
3441

35-
Deploying a pipeline in Elyra involves several key steps:
42+
In the video, you can see that we have composed two different pipelines:
3643

37-
1. Designing the Pipeline: Start by organizing your scripts or notebooks into nodes within the Elyra pipeline editor.
38-
2. Configuring Nodes: Set up each node with the necessary parameters, such as file paths, environment variables, and dependencies.
39-
3. Connecting Nodes: Connect the nodes to define the flow of data and execution sequence.
40-
4. Running the Pipeline: Execute the pipeline directly from Elyra, which will orchestrate the workflow based on the configured platform, such as local, Kubeflow, or Airflow.
41-
5. Monitoring Execution: Elyra provides tools to monitor the pipeline’s progress and debug if needed, ensuring that any issues can be addressed promptly.
44+
+ Cowsay: this is the first toy example, where we use a custom module that interacts with the [Cowsay OSCAR service](https://github.com/grycap/oscar/tree/master/examples/cowsay) that takes text as input and returns an ASCII art of a cow repeating the same text as output. This example is available [here](https://github.com/ai4os/ai4-compose/tree/main/elyra/examples/cowsay).
45+
+ Plant Classification workflow with input preprocessing: this second example shows how to compose a workflow for AI inference where two different OSCAR services are involved: the first one will convert the colour image of a plant to black and white and then, the second one classifies the plant to determine its species. The example is available [here](https://github.com/ai4os/ai4-compose/tree/main/elyra/examples/grayify%2Bplants-classification).
4246

43-
This process enables users to efficiently manage complex workflows and automate repetitive tasks, enhancing productivity and focusing on strategic tasks.
4447

48+
## Deploying the pipeline
4549

46-
# Summary
50+
Once the pipeline has been created and all the nodes are properly connected, we can deploy it. Deploying a pipeline in Elyra involves three steps:
4751

48-
Elyra simplifies the integration of OSCAR services within the EGI Notebooks environment, offering a user-friendly approach to managing complex pipelines. This post outlines how Elyra enhances productivity by streamlining processes, from repository cloning to workflow execution.
52+
1. Configuring the Nodes: Set up each node with the necessary parameters, such as file paths, environment variables, credentials, and dependencies. Watch the video for more details.
53+
2. Running the Pipeline: Execute the pipeline directly from Elyra, which will orchestrate the workflow based on the configured platform, such as local, Kubeflow, or Airflow.
54+
3. Monitoring Execution: Elyra provides tools to monitor the pipeline’s progress and debug if needed, ensuring that any issues can be addressed promptly. Watch the video demo to discover the ouptuts of the two example workflows.
4955

50-
We hope this overview inspires you to explore the capabilities of Elyra and OSCAR in EGI Notebooks, helping you to leverage these powerful tools for your projects. Enjoy the innovative computing possibilities!
56+
This process enables users to efficiently manage complex workflows and automate the execution of OSCAR services, with the ability to interconnect them in a pipeline.
5157

5258

59+
## Summary
5360

61+
Elyra simplifies the execution of OSCAR services within the EGI Notebooks environment (and in general, in a Jupyter Notebooks environment), offering a user-friendly approach to managing complex pipelines. This post outlines how Elyra enhances productivity by streamlining processes, from repository cloning to workflow execution. For more information, there is a [documentation entry](https://docs.ai4os.eu/en/latest/user/howto/ai4-compose/elyra.html) in the official AI4OS docs repo, where you can find more details to start testing it.
5462

5563

64+
We hope this overview inspires you to explore how to use OSCAR through Elyra in a Jupyter Notebooks environment (like the one provided by EGI Notebooks), helping you to leverage these powerful tools for your projects. Enjoy the innovative computing possibilities!
5665

content/english/blog/post-nodered-flowfuse.md

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Composing AI Inference pipelines with Node-RED & Flowfuse"
3-
date: 2024-04-16T09:00:00+01:00
3+
date: 2024-05-08T09:00:00+01:00
44
# post image
55
image: "/images/blog/post-nodered-flowfuse/post-image.png"
66
# post type (regular/featured)
@@ -11,40 +11,45 @@ description: "This is a guide for the use of the OSCAR API through Node-RED and
1111
draft: false
1212
---
1313

14-
{{< youtube 9a019SA5GW4 >}}
14+
In this post, we are going to learn about composing AI inference workflows by invoking OSCAR services with Node-RED & FlowFuse. Both tools facilitate the graphical composition of pipelines, a user-friendly approach with drag & drop capabilities that allow us to easily compose a pipeline involving different OSCAR services. For that, we have prepared a video demo that we invite you to watch. These developments are part of [AI4-Compose](https://github.com/ai4os/ai4-compose), a component of the [AI4OS](https://ai4os.eu) stack, created in the [AI4EOSC](https://ai4eosc.eu/) project.
1515

16+
{{< youtube 9a019SA5GW4 >}}
1617

17-
# What is Node-RED and FlowFuse?
18+
## About Node-RED and FlowFuse
1819

1920
![Node-RED icon](../../images/blog/post-nodered-flowfuse/node-red.png)
2021

21-
[Node-RED](https://nodered.org/) is a programming tool for wiring together hardware devices, APIs, and online services in new and interesting ways. It provides a browser-based editor that makes it easy to wire together flows using the wide range of nodes in the palette that can be deployed to its runtime in a single-click. [FlowFuse](https://flowfuse.com/), on the other hand, appears to be an extension or a set of tools built around Node-RED, designed to enhance its capabilities, particularly in integrating more complex workflows or enhancing connectivity with various services and protocols.
22+
On the one hand, [Node-RED](https://nodered.org/) is an open-source visual programming tool. Built on Node.js, it allows users to create event-driven systems by connecting nodes representing different functionalities. With a user-friendly web interface and a rich library of pre-built nodes, Node-RED simplifies the visual composition of workflows.
2223

24+
[FlowFuse](https://flowfuse.com/), on the other hand, is the DevOps platform for Node-RED application development and delivery. It adds to the Node-RED functionalities the ability to perform collaborative development by hosting various Node-RED applications, the management of remote deployments and the support for DevOps delivery pipelines.
2325

24-
# How a workflow in Node-RED works?
26+
The combination of these tools with OSCAR allows users to visually compose AI model inference pipelines. But let's learn more about how Node-RED works.
27+
28+
## How does a workflow in Node-RED work?
2529

2630
![Node-RED workflow](../../images/blog/post-nodered-flowfuse/example.png)
2731

28-
A workflow in Node-RED is a set of nodes connected together to create a flow of operations. Each node performs an operation, and the data moves between nodes via wires in the visual interface. Users can drag and drop different types of nodes from the palette into a workspace and configure them to perform tasks like receiving data, processing it, and sending it elsewhere. Flows can be triggered by web requests, handle files, interact with APIs, and perform a multitude of other functions.
32+
A workflow in Node-RED is a set of nodes connected to create a flow of operations. Each node performs an operation, and the data moves between nodes via wires in the visual interface. Users can drag and drop different types of nodes from the palette into a workspace and configure them to perform tasks like receiving data, processing it, and sending it elsewhere. Flows can be triggered by web requests, handle files, interact with APIs, and perform a multitude of other functions.
2933

34+
In the context of AI4EOSC, we have developed new custom nodes created to simplify performing the AI model inference on a remote OSCAR cluster. These nodes correspond with a model available for inference in the AI4EOSC Marketplace, like for example the [Plants Species Classifier](https://dashboard.cloud.ai4eosc.eu/marketplace/modules/deep-oc-plants-classification-tf), and are publicly available in the Node-RED Library, a repository that allows users to share and reuse flows and function nodes. You can access them by following this [link](https://flows.nodered.org/search?term=ai4eosc). Note that the number of nodes will be updated progressively and according to the models developed in the project.
3035

31-
# Deploying a pipeline
36+
## Designing and deploying a workflow
3237

3338
![Node-RED workflow](../../images/blog/post-nodered-flowfuse/deploy.png)
3439

35-
Deploying a workflow in Node-RED involves moving a developed flow from the construction environment (usually a local machine or a development server) to a production environment where it will run. This is typically done with a few clicks in the Node-RED interface. The deployment makes the flow active, allowing it to interact with real-world data and users. Adjustments to deployed flows can often be made in real-time, and version control can be implemented to manage changes systematically.
36-
40+
As shown in the video demo, after creating an application in FlowFuse, and a Node-RED instance (that is automatically created when we create an application), we can start creating our workflow. To design the workflow, users select nodes available on the left-side panel, drag & drop the boxes to the central panel, and connect them, as you can see in the video. The Node-RED interface is very intuitive, and facilitates the composition of complex workflows. In the video, you can see that we have composed two different pipelines:
3741

38-
# How the Node-RED Library works?
42+
+ Cowsay: this is the first toy example, where we use a custom module that interacts with an [OSCAR service](https://github.com/grycap/oscar/tree/master/examples/cowsay) that takes text as input and returns an ASCII art of a cow repeating the same text as output.
43+
+ Plant Classification workflow with input preprocessing: this second example shows how to compose a workflow for AI inference where two different OSCAR services are involved: the first one will convert the color image of a plant to black and white and then, the second one classifies the plant to determine its species.
3944

40-
The Node-RED Library allows users to share and reuse flows and function nodes. It is a repository where developers can publish their flows, making them available to the wider community. Users can browse this library to find pre-built solutions or components that can be imported directly into their projects. This feature significantly speeds up development time and fosters a collaborative environment by leveraging community contributions.
45+
Once the workflows have been designed, we can deploy them. For that, before running the resulting pipeline, we need we need to configure each module appropriately. This means adding the input data that OSCAR services will receive and configuring the custom OSCAR nodes by providing the endpoint of the OSCAR cluster we will use, the name of the service in the OSCAR cluster and the token. With all set, we can start the execution of the pipeline and wait for the results. See the video demo to discover the outputs of the two example workflows.
4146

47+
## Summary
4248

43-
# Summary
49+
Node-RED enhances the automation capabilities within the FlowFuse environment, providing an intuitive method for integrating various OSCAR services and managing complex AI inference workflows. For more information, there is a [documentation entry](https://docs.ai4os.eu/en/latest/user/howto/ai4-compose/flows.html) in the official AI4OS docs repo, where you can find more details to start testing it.
4450

45-
Node-RED enhances the automation capabilities within the FlowFuse environment, providing an intuitive method for integrating various services and managing complex workflows.
51+
We hope this overview encourages you to discover how to use OSCAR through Node-RED and FlowFuse, aiding you in harnessing these robust tools for your automation projects. Explore the potential for innovative automation solutions!
4652

47-
We hope this overview encourages you to discover the functionalities of Node-RED and FlowFuse, aiding you in harnessing these robust tools for your automation projects. Explore the potential for innovative automation solutions!
4853

4954

5055

0 commit comments

Comments
 (0)