Skip to content

Commit

Permalink
Update from develop
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianJacta committed Sep 21, 2023
1 parent ffd950c commit 8d7258f
Show file tree
Hide file tree
Showing 49 changed files with 5,107 additions and 1,119 deletions.
Original file line number Diff line number Diff line change
@@ -1,24 +1,18 @@
# Getting Started with Taipy Core

!!! important "Supported Python versions"

Taipy requires **Python 3.8** or newer.

Welcome to the **Getting Started Core** guide for Taipy Core. This tour shows you how to use Taipy Core.

Welcome to the **Tutorial** guide for scenario management.

# Taipy Core
Taipy facilitates pipeline orchestration. There are a lot of reasons for using Taipy backend:

Taipy Core is one of the components of Taipy to facilitate pipeline orchestration. There are a lot of reasons for using Taipy Core:
- Taipy efficiently manages the execution of your functions/pipelines.

- Taipy Core efficiently manages the execution of your functions/pipelines.
- Taipy manages data sources and monitors KPIs.

- Taipy Core manages data sources and monitors KPIs.
- Taipy provides easy management of multiple pipelines and end-user scenarios, which comes in handy in the context of Machine Learning or Mathematical optimization.

- Taipy Core provides easy management of multiple pipelines and end-user scenarios, which comes in handy in the context of Machine Learning or Mathematical optimization.

Each step of the **"Getting Started Core"** will focus on basic concepts of *Taipy Core*. Note that every step is dependent on the code of the previous one. After completing the last step, you will have the skills to develop your own Taipy
application.
Each step of the **"Tutorial"** will focus on basic concepts of *Taipy Core*.

## Before we begin

Expand All @@ -36,34 +30,31 @@ $ pip install taipy
[Python installation guide](http://docs.python-guide.org/en/latest/starting/installation/)
can guide you through the process.

## Using Notebooks

This **Getting Started** is for Python scripts (*.py*) only. If you want to use **Jupyter Notebooks**, download this [notebook](https://docs.taipy.io/en/latest/getting_started/getting-started-core/getting_started.ipynb).

## Taipy Studio

There are two ways to configure Taipy Core, either by Python code or with Taipy Studio. We strongly recommend using Taipy Studio.
There are two ways to configure Taipy backend (Taipy Core), either by Python code or with Taipy Studio. We strongly recommend using Taipy Studio.

Taipy Studio is a VS Code extension that provides a graphical editor to describe pipelines. The configuration of Taipy Core can be done more easily and quickly through Taipy Studio.

So, without further delay, let's begin to code!

## Steps
## Concepts

1. [Configuration and execution](step_01/ReadMe.md)
1. [Configuration and execution](step_01/step_01.md)

2. [Basic functions](step_02/ReadMe.md)
2. [Basic functions](step_02/step_02.md)

3. [Data Node types](step_03/ReadMe.md)
3. [Data Node types](step_03/step_03.md)

4. [Cycles](step_04/ReadMe.md)
4. [Cycles](step_04/step_04.md)

5. [Scopes](step_05/ReadMe.md)
5. [Scopes](step_05/step_05.md)

6. [Skipping tasks](step_06/ReadMe.md)
6. [Skipping tasks](step_06/step_06.md)

7. [Execution modes](step_07/ReadMe.md)
7. [Execution modes](step_07/step_07.md)

8. [Scenario comparison](step_08/ReadMe.md)
8. [Scenario comparison](step_08/step_08.md)

9. [Scenario subscription](step_09/ReadMe.md)
9. [Scenario subscription](step_09/step_09.md)
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
[TAIPY]

[DATA_NODE.input]
scope = "SCENARIO:SCOPE"
default_data = "21:int"
[DATA_NODE.historical_temperature]

[DATA_NODE.output]
scope = "SCENARIO:SCOPE"
[DATA_NODE.date_to_forecast]

[TASK.double]
inputs = [ "input:SECTION",]
function = "__main__.double:function"
outputs = [ "output:SECTION",]
skippable = "False:bool"
[DATA_NODE.predictions]

[PIPELINE.my_pipeline]
tasks = [ "double:SECTION",]
[TASK.predict]
function = "__main__.predict:function"
inputs = [ "historical_temperature:SECTION", "date_to_forecast:SECTION",]
outputs = [ "predictions:SECTION",]
skippable = "False:bool"

[SCENARIO.my_scenario]
pipelines = [ "my_pipeline:SECTION",]
tasks = [ "predict:SECTION",]
additional_data_nodes = []

[SCENARIO.my_scenario.comparators]

[SCENARIO.my_scenario.sequences]
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
[TAIPY]

[DATA_NODE.input]
scope = "SCENARIO:SCOPE"
default_data = "21:int"

[DATA_NODE.output]
scope = "SCENARIO:SCOPE"

[TASK.double]
inputs = [ "input:SECTION",]
function = "__main__.double:function"
inputs = [ "input:SECTION",]
outputs = [ "output:SECTION",]
skippable = "False:bool"

[PIPELINE.my_pipeline]
tasks = [ "double:SECTION",]

[SCENARIO.my_scenario]
pipelines = [ "my_pipeline:SECTION",]
tasks = [ "double:SECTION",]
additional_data_nodes = []

[SCENARIO.my_scenario.comparators]

[SCENARIO.my_scenario.sequences]
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,28 @@

[DATA_NODE.historical_data]
storage_type = "csv"
scope = "SCENARIO:SCOPE"
default_path = "src/time_series.csv"
has_header = "True:bool"
exposed_type = "pandas"
default_path = "time_series.csv"

[DATA_NODE.month_data]
scope = "SCENARIO:SCOPE"

[DATA_NODE.nb_of_values]
scope = "SCENARIO:SCOPE"

[TASK.filter_current]
inputs = [ "historical_data:SECTION",]
function = "__main__.filter_current:function"
inputs = [ "historical_data:SECTION",]
outputs = [ "month_data:SECTION",]
skippable = "False:bool"

[TASK.count_values]
inputs = [ "month_data:SECTION",]
function = "__main__.count_values:function"
inputs = [ "month_data:SECTION",]
outputs = [ "nb_of_values:SECTION",]
skippable = "False:bool"

[PIPELINE.my_pipeline]
tasks = [ "filter_current:SECTION", "count_values:SECTION",]

[SCENARIO.my_scenario]
pipelines = [ "my_pipeline:SECTION",]
tasks = [ "filter_current:SECTION", "count_values:SECTION",]
additional_data_nodes = []

[SCENARIO.my_scenario.comparators]

[SCENARIO.my_scenario.sequences]
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,31 @@

[DATA_NODE.historical_data]
storage_type = "csv"
scope = "SCENARIO:SCOPE"
default_path = "time_series.csv"
has_header = "True:bool"
exposed_type = "pandas"

[DATA_NODE.month]
scope = "SCENARIO:SCOPE"

[DATA_NODE.month_data]
scope = "SCENARIO:SCOPE"

[DATA_NODE.nb_of_values]
scope = "SCENARIO:SCOPE"

[TASK.filter_by_month]
inputs = [ "historical_data:SECTION", "month:SECTION",]
function = "__main__.filter_by_month:function"
inputs = [ "historical_data:SECTION", "month:SECTION",]
outputs = [ "month_data:SECTION",]
skippable = "False:bool"

[TASK.count_values]
inputs = [ "month_data:SECTION",]
function = "__main__.count_values:function"
inputs = [ "month_data:SECTION",]
outputs = [ "nb_of_values:SECTION",]
skippable = "False:bool"

[PIPELINE.my_pipeline]
tasks = [ "filter_by_month:SECTION", "count_values:SECTION",]

[SCENARIO.my_scenario]
pipelines = [ "my_pipeline:SECTION",]
tasks = [ "filter_by_month:SECTION", "count_values:SECTION",]
additional_data_nodes = []
frequency = "MONTHLY:FREQUENCY"

[SCENARIO.my_scenario.comparators]

[SCENARIO.my_scenario.sequences]
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
storage_type = "csv"
scope = "GLOBAL:SCOPE"
default_path = "time_series.csv"
has_header = "True:bool"
exposed_type = "pandas"

[DATA_NODE.month]
scope = "CYCLE:SCOPE"
Expand All @@ -14,25 +12,24 @@ scope = "CYCLE:SCOPE"
scope = "CYCLE:SCOPE"

[DATA_NODE.nb_of_values]
scope = "SCENARIO:SCOPE"

[TASK.filter_by_month]
inputs = [ "historical_data:SECTION", "month:SECTION",]
function = "__main__.filter_by_month:function"
inputs = [ "historical_data:SECTION", "month:SECTION",]
outputs = [ "month_data:SECTION",]
skippable = "False:bool"

[TASK.count_values]
inputs = [ "month_data:SECTION",]
function = "__main__.count_values:function"
inputs = [ "month_data:SECTION",]
outputs = [ "nb_of_values:SECTION",]
skippable = "False:bool"

[PIPELINE.my_pipeline]
tasks = [ "filter_by_month:SECTION", "count_values:SECTION",]

[SCENARIO.my_scenario]
pipelines = [ "my_pipeline:SECTION",]
tasks = [ "filter_by_month:SECTION", "count_values:SECTION",]
additional_data_nodes = []
frequency = "MONTHLY:FREQUENCY"

[SCENARIO.my_scenario.comparators]

[SCENARIO.my_scenario.sequences]
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,32 @@
storage_type = "csv"
scope = "GLOBAL:SCOPE"
default_path = "time_series.csv"
has_header = "True:bool"
exposed_type = "pandas"

[DATA_NODE.month]
scope = "CYCLE:SCOPE"

[DATA_NODE.month_data]
scope = "CYCLE:SCOPE"
cacheable = "True:bool"

[DATA_NODE.nb_of_values]
scope = "SCENARIO:SCOPE"
cacheable = "True:bool"

[TASK.filter_by_month]
inputs = [ "historical_data:SECTION", "month:SECTION",]
function = "__main__.filter_by_month:function"
inputs = [ "historical_data:SECTION", "month:SECTION",]
outputs = [ "month_data:SECTION",]
skippable = "True:bool"

[TASK.count_values]
inputs = [ "month_data:SECTION",]
function = "__main__.count_values:function"
inputs = [ "month_data:SECTION",]
outputs = [ "nb_of_values:SECTION",]
skippable = "True:bool"

[PIPELINE.my_pipeline]
tasks = [ "filter_by_month:SECTION", "count_values:SECTION",]

[SCENARIO.my_scenario]
pipelines = [ "my_pipeline:SECTION",]
tasks = [ "filter_by_month:SECTION", "count_values:SECTION",]
additional_data_nodes = []
frequency = "MONTHLY:FREQUENCY"

[SCENARIO.my_scenario.comparators]

[SCENARIO.my_scenario.sequences]
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,29 @@ mode = "standalone"
max_nb_of_workers = "2:int"

[DATA_NODE.input]
scope = "SCENARIO:SCOPE"
default_data = "21:int"

[DATA_NODE.intermediate]
scope = "SCENARIO:SCOPE"
default_data = "21:int"

[DATA_NODE.output]
scope = "SCENARIO:SCOPE"

[TASK.double]
inputs = [ "input:SECTION",]
function = "__mp_main__.double:function"
inputs = [ "input:SECTION",]
outputs = [ "intermediate:SECTION",]
skippable = "False:bool"

[TASK.add]
inputs = [ "intermediate:SECTION",]
function = "__mp_main__.add:function"
inputs = [ "intermediate:SECTION",]
outputs = [ "output:SECTION",]
skippable = "False:bool"

[PIPELINE.my_pipeline]
tasks = [ "double:SECTION", "add:SECTION",]

[SCENARIO.my_scenario]
pipelines = [ "my_pipeline:SECTION",]
tasks = [ "double:SECTION", "add:SECTION",]
additional_data_nodes = []

[SCENARIO.my_scenario.comparators]

[SCENARIO.my_scenario.sequences]
Original file line number Diff line number Diff line change
@@ -1,34 +1,30 @@
[TAIPY]

[DATA_NODE.input]
scope = "SCENARIO:SCOPE"
default_data = "21:int"

[DATA_NODE.intermediate]
scope = "SCENARIO:SCOPE"

[DATA_NODE.output]
scope = "SCENARIO:SCOPE"

[TASK.double]
inputs = [ "input:SECTION",]
function = "__main__.double:function"
inputs = [ "input:SECTION",]
outputs = [ "intermediate:SECTION",]
skippable = "False:bool"

[TASK.add]
inputs = [ "intermediate:SECTION",]
function = "__main__.add:function"
inputs = [ "intermediate:SECTION",]
outputs = [ "output:SECTION",]
skippable = "False:bool"

[PIPELINE.my_pipeline]
tasks = [ "double:SECTION", "add:SECTION",]

[SCENARIO.multiply_scenario]
pipelines = [ "my_pipeline:SECTION",]
frequency = "MONTHLY:FREQUENCY"
tasks = [ "double:SECTION", "add:SECTION",]
additional_data_nodes = []
name = "my_scenario"

[SCENARIO.multiply_scenario.comparators]
output = [ "__main__.compare_function:function",]

[SCENARIO.multiply_scenario.sequences]
Loading

0 comments on commit 8d7258f

Please sign in to comment.