You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -45,25 +45,26 @@ AI developers from all experience levels can make use of the framework through i
45
45
### Project Architecture
46
46
47
47
The *SustainML Framework* is composed of different Software Modules, each one related to a specific task, which are specialized in solving the different parts of the machine learning problem architecture definition, starting from the user’s problem description.
48
-
Each of the modules forms a Node.
49
-
These steps are basically:
48
+
Each of these modules forms a Node.
49
+
The main processing steps are:
50
50
51
51
1. Encode the problem and constraints defined by the user
52
52
2. Suggest a machine learning model
53
53
3. Propose an optimized hardware for running the suggested model
54
-
4. Warn about the estimated carbon footprint that would take training the model in the hardware
54
+
4. Warn about the estimated carbon footprint of training the model on the proposed hardware
55
55
56
-
All the Nodes shall import its corresponding Python library, so that each Node can be abstracted from the DDS communications.
56
+
All the Nodes shall import their corresponding Python library, so that each Node can be abstracted from the DDS communications.
57
57
58
58
### Library
59
59
60
-
This library repository contains all the modules definitions.
61
-
The Framework uses the library API to deploy those different SustainML modules.
62
-
The exchanged information between the modules is over DDS.
60
+
This library repository contains all the modules definitions. This repository is not intended to be used or installed independently.
61
+
It is consumed internally by the SustainML Framework.
62
+
The Framework uses the library API to deploy different SustainML modules.
63
+
Information exchanged between modules is transmitted over DDS.
63
64
64
65
### Framework
65
66
66
-
The Framework includes a *Graphical User Interface* (GUI) in which user interacts and introduces the ML problem definition.
67
+
The Framework includes a *Graphical User Interface* (GUI) through which the user interacts with the framework and defines the ML problem.
67
68
That GUI implements also the **Orchestrator** node, a key node that feeds the remaining modules with the information provided by the user, retrieves all the results, and display them to the user through this GUI.
This package contains the core C++ implementation of SustainML logic and the public C++ API used by other SustainML components.
4
+
5
+
The public C++ types are designed to avoid exposing Fast DDS types in public headers to keep the SWIG Python wrapper generation simple. Implementation types generated from IDL use the `Impl` suffix and are wrapped by public types.
6
+
7
+
## Scope
8
+
9
+
This package is primarily intended for SustainML developers and contributors. End users should follow the installation and deployment instructions in the SustainML Framework repository:
10
+
11
+
https://github.com/eProsima/SustainML-Framework
12
+
13
+
## Build
14
+
15
+
This package is a colcon package and is built automatically as part of the SustainML workspace.
16
+
17
+
For development and verification purposes, it can be built independently:
Copy file name to clipboardExpand all lines: sustainml_cpp/utils/instructions/README.md
+36-19Lines changed: 36 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,24 +1,35 @@
1
1
# Regenerate types instructions
2
2
3
-
The design of the SustainML CPP library follows a structure where the public types exposed does not contain any Fast DDS types in public includes.
3
+
The design of the SustainML CPP library follows a structure where the public types exposed do not contain any Fast DDS types in public includes.
4
4
In that way, exposing Fast DDS complex types is avoided, which makes SWIG python wrapper generation way more simple.
5
-
To reach that, the public types contain implementation types, which are the originally generated by Fast DDS Gen with the idl (see that all idl elements have the `Impl` suffix).
6
-
The next steps needs to be followed to do so while trying to regenerate SustainML types:
5
+
To reach that, the public types contain implementation types, which are originally generated by Fast DDS Gen with the idl (see that all idl elements have the `Impl` suffix).
6
+
The next steps need to be followed to do so while trying to regenerate SustainML types:
7
7
8
-
1. Update .idl file
9
-
1. Regenerate types with utils script
8
+
## Prerequisites
9
+
10
+
- A working SustainML workspace
11
+
-`fastddsgen` available in the system `PATH`
12
+
- Bash shell environment
13
+
14
+
## Regenerating types
15
+
1. Update the corresponding .idl file
16
+
1. Regenerate the implementation types using the provided utility script:
1. Manually introduce the `sustainml_cpp/src/cpp/types/typesImpl.hpp` changes in `sustainml_cpp/include/sustainml_cpp/types/types.hpp`, and applying these changes:
14
-
1. Copy the complete class `ClassNameImpl` in the _types.hpp_ file
15
-
1. Rename it as `ClassName` (remove `Impl` suffix), as well as all its usage in its methods and comments.
16
-
1. Remove all code from the methods, leaving only their definitions.
17
-
1. Introduce the following line right after the _public_ declaration:
20
+
1. Manually introduce the `sustainml_cpp/src/cpp/types/typesImpl.hpp` changes in `sustainml_cpp/include/sustainml_cpp/types/types.hpp`, and Apply the following steps:
21
+
22
+
**a)** Copy the complete class `ClassNameImpl` in the _types.hpp_ file.
23
+
24
+
**b)** Rename it as `ClassName` (remove the `Impl` suffix), including all references in method declarations and comments.
25
+
26
+
**c)** Remove all method implementations, keeping only method declarations.
27
+
28
+
**d)** Introduce the following line right after the _public_ declaration:
18
29
19
30
`using impl_type = ClassNameImpl;`
20
31
21
-
1. Include at the end of the _public_ declarations the following _impl_ retrieve methods:
32
+
**e)** Include at the end of the _public_ declarations the following _impl_ retrieve methods:
22
33
23
34
24
35
```cpp
@@ -29,26 +40,29 @@ The next steps needs to be followed to do so while trying to regenerate SustainM
29
40
ClassNameImpl* get_impl();
30
41
31
42
/*!
32
-
* @brief This function retrives the implementation type info
43
+
* @brief This function retrieves the implementation type info
33
44
* @return Reference to the typeid
34
45
*/
35
46
static const std::type_info& impl_typeinfo();
36
47
```
37
48
38
-
1. Substitute _private_ declaration with the variables, for a _protected_ declaration as the following:
49
+
**f)** Substitute the _private_section with the following _protected_section:
39
50
40
51
```cpp
41
52
protected:
42
53
43
54
ClassNameImpl* impl_;
44
55
friend class ClassNameImpl;
45
56
```
46
-
1. Please review the existing classes in the library and ensure that the new one follows the same style.
57
+
**g)** Ensure the resulting class follows the same structure and style as the existing public types.
58
+
59
+
1. Manually introduce the `sustainml_cpp/src/cpp/types/typesImpl.hpp` changes in `sustainml_cpp/src/cpp/types/types.cpp`, and apply the following steps:
60
+
61
+
**a)** Copy the complete class `ClassNameImpl` in the _types.cpp_ file
47
62
48
-
1. Manually introduce the `sustainml_cpp/src/cpp/types/typesImpl.hpp` changes in `sustainml_cpp/src/cpp/types/types.cpp`, and applying these changes:
49
-
1. Copy the complete class`ClassNameImpl` in the _types.cpp_ file
50
-
1. Rename it as `ClassName` (remove `Impl` suffix), as well as all its usage in its methods and comments.
51
-
1. Make all methods to call the corresponding `ClassNameImpl` method. That applies also to operators, constructor and destructor. The following snippet is an example, but for any other case, please review the already implemented classes to mimic:
63
+
**b)** Rename it as `ClassName` (remove `Impl` suffix), including all references.
64
+
65
+
**c)** Make all methods call the corresponding `ClassNameImpl` method. That also applies to operators, constructor and destructor. The following snippet is an example. For any other case, please review the already implemented classes to mimic:
52
66
53
67
```cpp
54
68
ClassName& ClassName::operator =(
@@ -76,7 +90,7 @@ The next steps needs to be followed to do so while trying to regenerate SustainM
76
90
}
77
91
```
78
92
79
-
1. At the very end of each class, implement the _impl_ retrieve methods included in the _types.h_ file:
93
+
**d)** At the very end of each class, implement the _impl_ retrieve methods included in the _types.hpp_ file:
80
94
81
95
```cpp
82
96
ClassNameImpl* ClassName::get_impl()
@@ -89,3 +103,6 @@ The next steps needs to be followed to do so while trying to regenerate SustainM
This directory contains the implementation of **Work Package 4 (WP4)** components of the SustainML project.
4
+
5
+
WP4 provides the **frontend functionality** of the SustainML Framework. It includes a web-based interface that allows users to:
6
+
7
+
- Collecting user input that defines the ML problem and constraints
8
+
- Uploading datasets and inspecting basic dataset properties
9
+
- Assisting the user in selecting problem definition parameters
10
+
- Forwarding user input to the backend and displaying execution status and results
11
+
12
+
The frontend is implemented as a Python module and exposed through a lightweight web application.
13
+
14
+
## Scope
15
+
16
+
WP4 components are integrated into the SustainML Framework through the `sustainml_modules` package and are **not intended to be used as standalone applications**.
17
+
18
+
This code is primarily intended for SustainML developers and contributors working on the user interaction and frontend aspects of the framework.
19
+
20
+
End users should follow the installation and deployment instructions in the SustainML Framework repository:
This directory contains the implementation of **Work Package 5 (WP5)** components of the SustainML project.
4
+
5
+
WP5 provides the **backend and orchestration functionality** of the SustainML Framework. It is responsible for:
6
+
7
+
- Receiving user input from the frontend
8
+
- Running the Orchestrator node and coordinating task execution
9
+
- Providing execution status and collecting results produced by the framework
10
+
11
+
WP5 acts as the central coordination layer between the frontend and the remaining SustainML components.
12
+
13
+
## Scope
14
+
15
+
WP5 components are integrated into the SustainML Framework through the `sustainml_modules` package and are **not intended to be used as standalone services**.
16
+
17
+
This code is intended for SustainML developers and contributors working on framework orchestration and backend logic.
18
+
19
+
End users should follow the installation and deployment instructions in the SustainML Framework repository:
0 commit comments