AbstractIntegratedModule 1.0.0__tar.gz → 1.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {abstractintegratedmodule-1.0.0 → abstractintegratedmodule-1.0.1/AbstractIntegratedModule.egg-info}/PKG-INFO +170 -144
- {abstractintegratedmodule-1.0.0 → abstractintegratedmodule-1.0.1}/AbstractOptimizedModules.c +200 -200
- abstractintegratedmodule-1.0.0/README.md → abstractintegratedmodule-1.0.1/PKG-INFO +1232 -1174
- abstractintegratedmodule-1.0.0/AbstractIntegratedModule.egg-info/PKG-INFO → abstractintegratedmodule-1.0.1/README.md +1200 -1206
- {abstractintegratedmodule-1.0.0 → abstractintegratedmodule-1.0.1}/setup.py +1 -1
- {abstractintegratedmodule-1.0.0 → abstractintegratedmodule-1.0.1}/AbstractIntegratedModule.egg-info/SOURCES.txt +0 -0
- {abstractintegratedmodule-1.0.0 → abstractintegratedmodule-1.0.1}/AbstractIntegratedModule.egg-info/dependency_links.txt +0 -0
- {abstractintegratedmodule-1.0.0 → abstractintegratedmodule-1.0.1}/AbstractIntegratedModule.egg-info/requires.txt +0 -0
- {abstractintegratedmodule-1.0.0 → abstractintegratedmodule-1.0.1}/AbstractIntegratedModule.egg-info/top_level.txt +0 -0
- {abstractintegratedmodule-1.0.0 → abstractintegratedmodule-1.0.1}/AbstractIntegratedModule.py +0 -0
- {abstractintegratedmodule-1.0.0 → abstractintegratedmodule-1.0.1}/AbstractOptimizedModules.pyx +0 -0
- {abstractintegratedmodule-1.0.0 → abstractintegratedmodule-1.0.1}/MANIFEST.in +0 -0
- {abstractintegratedmodule-1.0.0 → abstractintegratedmodule-1.0.1}/abstract_model_storage/Cargo.toml +0 -0
- {abstractintegratedmodule-1.0.0 → abstractintegratedmodule-1.0.1}/abstract_model_storage/pyproject.toml +0 -0
- {abstractintegratedmodule-1.0.0 → abstractintegratedmodule-1.0.1}/abstract_model_storage/src/lib.rs +0 -0
- {abstractintegratedmodule-1.0.0 → abstractintegratedmodule-1.0.1}/abstract_model_storage/target/debug/build/libsqlite3-sys-ed07b882cd2aa5e2/out/bindgen.rs +0 -0
- {abstractintegratedmodule-1.0.0 → abstractintegratedmodule-1.0.1}/abstract_model_storage/target/debug/build/serde_core-ebc15f2e9cad7f5f/out/private.rs +0 -0
- {abstractintegratedmodule-1.0.0 → abstractintegratedmodule-1.0.1}/abstract_model_storage/target/debug/build/target-lexicon-08527f45de28143d/out/host.rs +0 -0
- {abstractintegratedmodule-1.0.0 → abstractintegratedmodule-1.0.1}/abstract_model_storage/target/release/build/libsqlite3-sys-bf0400df4523274c/out/bindgen.rs +0 -0
- {abstractintegratedmodule-1.0.0 → abstractintegratedmodule-1.0.1}/abstract_model_storage/target/release/build/serde_core-5cdb76131825e4af/out/private.rs +0 -0
- {abstractintegratedmodule-1.0.0 → abstractintegratedmodule-1.0.1}/abstract_model_storage/target/release/build/target-lexicon-43eb95a0588bf457/out/host.rs +0 -0
- {abstractintegratedmodule-1.0.0 → abstractintegratedmodule-1.0.1}/pyproject.toml +0 -0
- {abstractintegratedmodule-1.0.0 → abstractintegratedmodule-1.0.1}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: AbstractIntegratedModule
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.1
|
|
4
4
|
Summary: Library for Advanced Integrated Non-LLM AI Models - Optimized Backend Framework For Non-LLM AI Agent
|
|
5
5
|
Author: Micro-Novelty
|
|
6
6
|
Author-email: hernikpuspita5@gmail.com
|
|
@@ -33,31 +33,36 @@ Dynamic: summary
|
|
|
33
33
|
# [=] IntegratedPipeline-Specialized-AI-Agent-library
|
|
34
34
|
|
|
35
35
|
[~] Introduction:
|
|
36
|
-
- IntegratedPipeline is a standalone Specialized AI Agent Library for Non-
|
|
37
|
-
- AbstractIntegratedModule Contains specialized MLP using Its Own specialized geometric Weight shaping (AWE), Specialized efficient Transformer and LSTM (Long-short term memory) architecture for Scarce Data with Alpha-based computation, specifically designed for low-amount samples environment
|
|
36
|
+
- IntegratedPipeline is a standalone Specialized AI Agent Library for Non-LLM memory Augmented Agentic Framework orchestrator - Specifically designed to provide Agentic capability for any Autonomous Agentic Framework locally and Coordinatively that runs efficiently from consumer based machine to High-end embedded systems, where the AI Can directly and continously learn, with minimal and efficient compute, built-in augmented memory, Secure Peer-To-Peer (Multi-Agent) Coordination with security layers as an option, And Explainability capability based on proof from in it's internal metrics, reducing Black-Box condition necessary for reliability.
|
|
37
|
+
- AbstractIntegratedModule Contains specialized MLP using Its Own specialized geometric Weight shaping (AWE), Specialized efficient Transformer and LSTM (Long-short term memory) architecture for Scarce Data with Alpha-based computation, specifically designed for low-amount samples environment or Messy environments.
|
|
38
38
|
|
|
39
|
-
#### Github Repo (if you want to know or contribute)
|
|
40
|
-
https://github.com/Micro-Novelty/IntegratedPipeline-Specialized-Non-LLM-AI-Agent-Framework
|
|
41
|
-
|
|
42
|
-
#### Note: The README here you are reading is a direct copy from my README Repository, to download the necessary files, you can visit my Repository with the provided link above.
|
|
43
39
|
|
|
44
40
|
### Library Short Description:
|
|
45
|
-
- Development Stage: 1.0.
|
|
46
|
-
- Maintainer: Micro-Novelty.
|
|
47
|
-
- library Source-Code is Open-sourced
|
|
41
|
+
- Development Stage on PyPi: 1.0.1 Official Release.
|
|
42
|
+
- Author and Maintainer: Micro-Novelty and EpsitronNet-bot.
|
|
43
|
+
- library Source-Code is Open-sourced with MIT License.
|
|
48
44
|
- Purpose: Specifically Designed for providing Non-LLM AI Agent Framework for edge Devices, Optimized for ARM64 architecture.
|
|
49
45
|
- Library installation:
|
|
50
46
|
```bash
|
|
51
47
|
pip install AbstractIntegratedModule
|
|
52
48
|
python -m install AbstractIntegratedModule
|
|
53
49
|
```
|
|
50
|
+
|
|
51
|
+
### Github Link (for Visiting and cloning)
|
|
52
|
+
- https://github.com/Micro-Novelty/IntegratedPipeline-Specialized-Non-LLM-AI-Agent-Framework
|
|
53
|
+
|
|
54
|
+
- The library also includes precompiled binaries for:
|
|
55
|
+
- aarch64 manylinux (accepts version 2.17+) architecture, accepts python version 3.10, 3.11 only.
|
|
56
|
+
- aarch64 musllinux (accepts version 1.2+) architecture, accepts python version 3.10, 3.11 only.
|
|
57
|
+
- Windows 64 bit architecture (only python 3.13 only)
|
|
58
|
+
|
|
54
59
|
- Library installation if you dont have aarch64 setup, you can download the correct wheel for your setup in this repository or by using pip:
|
|
55
60
|
- ✨ use pip for downloading the correct wheels for your setup:
|
|
56
61
|
- ```bash
|
|
57
62
|
pip install abstractintegratedmodule --extra-index-url https://Micro-Novelty.github.io/abstract-modules/whl/ --break-system-packages
|
|
58
63
|
# ensures proper installation by bypassing pip strict external download setup.
|
|
59
64
|
```
|
|
60
|
-
- Note:
|
|
65
|
+
- Note: Using the above installation --extra-index method Provides you with:
|
|
61
66
|
- x86_64 and aarch64 with manylinux (v. 2.17+) and musllinux (v. 1.2+) architecture only (No regular singular x86_64 arch wheel, tarball will be used for regular x86_64 and windows).
|
|
62
67
|
- macOS with aarch64 and x86_64 architecture. (v. 10.9+)
|
|
63
68
|
- All of this Wheels provided in the Repository Only Provides Wheels for python with version 3.10 3.11 and 3.12.
|
|
@@ -68,7 +73,7 @@ https://github.com/Micro-Novelty/IntegratedPipeline-Specialized-Non-LLM-AI-Agent
|
|
|
68
73
|
- ```bash
|
|
69
74
|
pip install abstract-weights-core
|
|
70
75
|
```
|
|
71
|
-
- Note: This Optimization would
|
|
76
|
+
- Note: This Optimization would help AbstractIntegratedModule with faster JSON parsing and much more flexible database handling handled efficiently using Rust programming language.
|
|
72
77
|
|
|
73
78
|
- Proven Capabilities:
|
|
74
79
|
- The library has been thoroughly tested in Multiple Environments from Windows to ARM64 Environment. The library is now Robust for Wider use and Deployment.
|
|
@@ -78,12 +83,18 @@ https://github.com/Micro-Novelty/IntegratedPipeline-Specialized-Non-LLM-AI-Agent
|
|
|
78
83
|
- LSTM is Optimized efficiently for scarce data with AWE method.
|
|
79
84
|
- Robust Advanced prediction capabilities proven effective on ARM64 Using MLP + LSTM Architectures.
|
|
80
85
|
- Transformer Optimized using Cython, to reduce Memory overhead and Reduce CPU Usage, With Reduced Training Time.
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
86
|
+
-----
|
|
87
|
+
- Changelog:
|
|
88
|
+
- v1.0.1:
|
|
89
|
+
- [=] New features:
|
|
90
|
+
- Applied clean up staled request after adding request for batch prediction to prevent memory leak.
|
|
91
|
+
- Fixed edge cases where Advanced prediction method reputation calibration function call receives final_probs=None in Multi-threading environment.
|
|
92
|
+
- Added parameters for users to directly set how much Epochs are needed for MLP and Transformer training.
|
|
93
|
+
- Added capability for the Model to save accurate answer to Database efficiently.
|
|
94
|
+
- Fixed bug that can cause shape and type errors in edge cases in calibration function inside MLP.
|
|
95
|
+
|
|
84
96
|
<img width="1280" height="600" alt="WhatsApp Image 2026-05-27 at 07 16 32" src="https://github.com/user-attachments/assets/4b58a556-45a3-419b-96fd-9c1b76cac574" />
|
|
85
97
|
|
|
86
|
-
|
|
87
98
|
## [+] MANN Intro
|
|
88
99
|
[=] Memory augmented Neural network (MANN) is a neural network architecture coupled with an external, dynamic memory module, allowing it to store, retrieve, and update information similarly to a computer's RAM. Unlike traditional networks that store knowledge only in weight parameters, MANNs excel at fast learning, long-term dependency handling, and episodic recall, In IntegratedPipeline, Its memory is stored in a custom database inside your local machine, then later used for memory retrieval, transfered to the AI Dictionary where it can finnaly recall its memory when input condition matched with memory.
|
|
89
100
|
|
|
@@ -119,7 +130,7 @@ Transformers are the modern standard for AI, introduced in 2017 with the famous
|
|
|
119
130
|
- different from LLM that is static and cannot improve beyond its given training condition, AI Agent using IntegratedPipeline has a dynamic, flexible continously learning behavior with conditional training algorithms included in the library that has both supervised and unsupervised learning present, The learned input and predicted Output will be stored in the database, allowing it to recall its memory during processing and find matching known prediction given if input matched with the stored input inside the database. this Continous learning behavior is efficient because its not relying on weights for memory, allowing flexible and predictable behavior inside a given environment.
|
|
120
131
|
|
|
121
132
|
3. Robust Specialized MLP, Transformer and LSTM Architecture with ensemble weighting architecture:
|
|
122
|
-
- IntegratedPipeline
|
|
133
|
+
- IntegratedPipeline usually used 1 Model for regular prediction, but in some Conditions, it used 2 Different type's of AI Architecture stacked together, and one architecture to weight their confidence and probability fairly (ensemble method) to get the final prediction for the problem it faced, Specialized MLP for Noise robustness And Specialized Transformer that used Alpha-based Computing algorithm for contextual reasoning, LSTM architecture to provides proof-of-credibility over a certain output, acting as a support mechanism rather than Main orchestrator like MLP and Transformer. The reason why those Models complement and used together:
|
|
123
134
|
- Specialized MLP Provides synchronous robust classification Against noise with its specialized Weight Encoder (AWE) to handle noise using eigenvalue based computing that is lightweight and efficient. This Method can't be replicated Inside Transformer FFN (Feed-forward-network) because of Transformer dynamic brute force computing where AWE-Based generated weight's get diluted over time by Transformer dynamic projection embedding, making AWE Generated weight causes inefficient inside Transformer dynamic FFN/QKV projection.
|
|
124
135
|
- Specialized Transformer provides robust synchronous advanced contextual relationships, efficient data processing using Alpha based computing, The Transformer is tuned towards to be as flexible as possible to provide dynamic projection or fixed FFN projection training with minimal head's and dimension's to reduce computational power.
|
|
125
136
|
- LSTM doesn't act as a Main orchestrator, instead it Provides coherent Short-term memory for the Ensemble architecture, acting as a support mechanism to provides proof-of-credibility of a given answer from past previous context input, this allows flexible and achievable Aggreement between Transformer and MLP over a short period of time.
|
|
@@ -161,35 +172,49 @@ Transformers are the modern standard for AI, introduced in 2017 with the famous
|
|
|
161
172
|
2. - TF-IDF (Term Frequency-Inverse Document Frequency) is a numerical statistic used in machine learning and NLP to evaluate how important a word is to a document within a collection (corpus). It boosts rare words and penalizes common words (like "the", "and") by multiplying two metrics: how often a word appears in a document (TF) and the inverse frequency of the word across all documents (IDF).
|
|
162
173
|
3. - Explainability provides deeper transparency of why a model thought about a detail by showing its internal metrics like attention quality, from distributed peer memory or Ensemble prediction result's.
|
|
163
174
|
|
|
175
|
+
|
|
176
|
+
### Important Note:
|
|
177
|
+
- All of the files provided here can be found in the github repository, if you are seeing this on PyPi and wanted to Try out the .py, .sh or Dockerfile scripts below, consider visiting the github link Above.
|
|
178
|
+
|
|
164
179
|
### Introduction and demo
|
|
165
|
-
[](https://youtu.be/RmWvwDHU_QY?si=Lvl8mt8c_BnFypS_)
|
|
180
|
+
- Video Documentation: [](https://youtu.be/RmWvwDHU_QY?si=Lvl8mt8c_BnFypS_)
|
|
181
|
+
- Quick demo start: [main.py](main.py)
|
|
182
|
+
- purpose: let you demonstrate the advanced prediction method and asynchronous prediction directly.
|
|
183
|
+
- Quick test of P2P:
|
|
184
|
+
- [multi_agent_client.py](P2P_Setups/multi_agent_client.py)
|
|
185
|
+
- [multi_agent_server.py](P2P_Setups/multi_agent_server.py)
|
|
186
|
+
- [P2PDirectTest.py](P2P_Setups/P2PDirectTest.py)
|
|
187
|
+
- Purpose: let you demonstrate simple P2P using AbstractIntegratedModule quickly, there may be bugs in this P2P setup so feel free to share it in issues.
|
|
166
188
|
|
|
167
189
|
## [=] Requirements
|
|
168
|
-
[~] To run and execute IntegratedPipeline, Requirement's include Or see [Requirements](
|
|
190
|
+
[~] To run and execute IntegratedPipeline, Requirement's include Or see [Requirements](installation_guides/usage_needs.txt):
|
|
169
191
|
- pip install for quick usage:
|
|
170
192
|
- ```bash
|
|
171
193
|
pip install AbstractIntegratedModule # or
|
|
172
194
|
python -m pip install AbstractIntegratedModule
|
|
173
195
|
```
|
|
174
196
|
|
|
175
|
-
- Download
|
|
176
|
-
-
|
|
177
|
-
-
|
|
178
|
-
-
|
|
179
|
-
|
|
180
|
-
|
|
197
|
+
- (Optional) Download AbstractIntegratedModule Compiled Binary file extension manually in the repository for Users who can't use pip install (Choose one minimal, specified for your needs):
|
|
198
|
+
- AbstractOptimizedModules for Optimizing Transformer using Cython (Optional)
|
|
199
|
+
- AbstractIntegratedModule (Main library)
|
|
200
|
+
- Compiled Binaries can be downloaded from release section in the Main repo or You can use this link:
|
|
201
|
+
- Release section: https://github.com/Micro-Novelty/IntegratedPipeline-Specialized-Non-LLM-AI-Agent-Framework/releases
|
|
202
|
+
- Supported OS: Mac-Os, linux x86-64 and Windows.
|
|
203
|
+
|
|
204
|
+
- NOTE: for Mac-OS or linux x86-64 Users, consider downloading the correct python wheel for your setup in here for a much flexible installation:
|
|
205
|
+
- ```bash
|
|
206
|
+
pip install abstractintegratedmodule --extra-index-url https://Micro-Novelty.github.io/abstract-modules/whl/ --break-system-packages
|
|
207
|
+
```
|
|
208
|
+
Note: using this installation method grants you a much safer, predictable behavior, and more secure AbstractIntegratedModule library rather than a pure binary file.
|
|
209
|
+
|
|
210
|
+
- (Optional) Libraries needed (For using Compiled binary, not python wheels):
|
|
181
211
|
- Pandas
|
|
182
212
|
- aiohttp
|
|
183
213
|
- scikit-learn
|
|
184
214
|
- numpy
|
|
185
215
|
- psutil
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
- This file contains:
|
|
189
|
-
- AbstractIntegratedModule.pyd (For windows machine).
|
|
190
|
-
- AbstractIntegratedModule.cpython-39-x86_64-linux-gnu.so (For linux x86_64).
|
|
191
|
-
- AbstractIntegratedModule.cpython-39-aarch64-linux-gnu.so (for Linux ARM64 - Raspberry Pi).
|
|
192
|
-
|
|
216
|
+
- (Optional) Install AbstractIntegratedModule Compiled binaries from release section:
|
|
217
|
+
|
|
193
218
|
[=] for labels assignation:
|
|
194
219
|
- CSV file that contains training labels and titles used for training and prediction label map, example will be provided below, Go to Step's for in-depth Usage below.
|
|
195
220
|
|
|
@@ -213,20 +238,20 @@ Transformers are the modern standard for AI, introduced in 2017 with the famous
|
|
|
213
238
|
- Consider using faster storage (USB SSD) for better performance
|
|
214
239
|
|
|
215
240
|
## [=] Docker Container Application
|
|
216
|
-
0. See [Docker_installation_Section](Docker_installation_Section.md) for an in-depth explanation, or [Quick_Docker_start](Quick_Docker_start.sh) for a quick start.
|
|
241
|
+
0. See [Docker_installation_Section](docker-setups/Docker_installation_Section.md) for an in-depth explanation, or [Quick_Docker_start](docker-setups/Quick_Docker_start.sh) for a quick start.
|
|
217
242
|
- Note Consider checking:
|
|
218
|
-
- [Dockerfile](Dockerfile) contains all the instructions need to assemble a Docker container.
|
|
219
|
-
- [start.sh](start.sh) for Quick single agent start in Docker container.
|
|
220
|
-
- [entrypoint.sh](entrypoint.sh) for a Smart entrypoint used in Dockerfile (Must be downloaded too along with Dockerfile and put in the same folder with Dockerfile after its downloaded)
|
|
221
|
-
- [start-multi-agent-cluster.sh](start-multi-agent-cluster.sh) for Multi-agent cluster start in Docker container, What it does:
|
|
243
|
+
- [Dockerfile](docker-setups/Dockerfile) contains all the instructions need to assemble a Docker container.
|
|
244
|
+
- [start.sh](docker-setups/start.sh) for Quick single agent start in Docker container.
|
|
245
|
+
- [entrypoint.sh](docker-setups/entrypoint.sh) for a Smart entrypoint used in Dockerfile (Must be downloaded too along with Dockerfile and put in the same folder with Dockerfile after its downloaded)
|
|
246
|
+
- [start-multi-agent-cluster.sh](P2P_Setups/start-multi-agent-cluster.sh) for Multi-agent cluster start in Docker container, What it does:
|
|
222
247
|
- Starts a multi-agent Docker cluster — runs docker-compose up -d in detached mode (background), scaling the agent-client service to 5 simultaneous instances, alongside whatever server is defined in the docker-compose.yml.
|
|
223
248
|
- Tails the logs — runs docker-compose logs -f which streams live logs from all containers (server + all 5 clients) to your terminal until you hit Ctrl+C.
|
|
224
249
|
- [main.py](main.py) for executing a python script in the Docker container that used main.py, like in this code:
|
|
225
250
|
- ```bash
|
|
226
251
|
docker run -it -v $(pwd):/app/data integrated-pipeline:latest python /app/data/main.py
|
|
227
252
|
```
|
|
228
|
-
- To use a [.dockerignore](
|
|
229
|
-
- [.env](.env) is used for environment setup in [entrypoint.sh](entrypoint.sh), this file must be in the same folder with Dockerfile and entrypoint.sh after its downloaded.
|
|
253
|
+
- To use a [.dockerignore](docker-setups/.dockerignore) file, place it in your build context directory (the same location as your Dockerfile) to specify which files and folders should be excluded when building your image.
|
|
254
|
+
- [.env](.env) is used for environment setup in [entrypoint.sh](docker-setups/entrypoint.sh), this file must be in the same folder with Dockerfile and entrypoint.sh after its downloaded.
|
|
230
255
|
|
|
231
256
|
1. Build Image:
|
|
232
257
|
- Clone repository:
|
|
@@ -235,9 +260,9 @@ Transformers are the modern standard for AI, introduced in 2017 with the famous
|
|
|
235
260
|
cd IntegratedPipeline-Continous-Learning-AI-Agent-library-framework
|
|
236
261
|
```
|
|
237
262
|
- Download:
|
|
238
|
-
- [Dockerfile](Dockerfile),
|
|
239
|
-
- [entrypoint.sh](entrypoint.sh)
|
|
240
|
-
- [.env](
|
|
263
|
+
- [Dockerfile](docker-setups/Dockerfile),
|
|
264
|
+
- [entrypoint.sh](docker-setups/entrypoint.sh)
|
|
265
|
+
- [.env](docker-setups/.env)
|
|
241
266
|
- In the code or release section.
|
|
242
267
|
|
|
243
268
|
- If the downloaded Dockerfile or .dockerignore or .env has .txt extension, remove the extension:
|
|
@@ -256,7 +281,7 @@ Transformers are the modern standard for AI, introduced in 2017 with the famous
|
|
|
256
281
|
sudo docker build -t integrated-agent.
|
|
257
282
|
```
|
|
258
283
|
2. Download library dependencies for binaries usage:
|
|
259
|
-
[
|
|
284
|
+
- [Optional]: Required libraries (when using binary, not python wheel provided in the library):
|
|
260
285
|
- Numpy
|
|
261
286
|
- Scikit-learn
|
|
262
287
|
- pandas
|
|
@@ -264,7 +289,7 @@ Transformers are the modern standard for AI, introduced in 2017 with the famous
|
|
|
264
289
|
- psutil
|
|
265
290
|
|
|
266
291
|
4. Run IntegratedPipeline in a Container:
|
|
267
|
-
- Install AbstractIntegratedModule via PIP or
|
|
292
|
+
- Install AbstractIntegratedModule via PIP or Compiled binaries:
|
|
268
293
|
- ```bash
|
|
269
294
|
pip install AbstractIntegratedModule # or
|
|
270
295
|
python -m pip install AbstractIntegratedModule
|
|
@@ -304,7 +329,7 @@ Transformers are the modern standard for AI, introduced in 2017 with the famous
|
|
|
304
329
|
```
|
|
305
330
|
|
|
306
331
|
[=] Multi agent P2P (Consider docker-compose) :
|
|
307
|
-
- Note: Use the provided [docker-compose.yml](docker-compose.yml) for Quick multi-agent.
|
|
332
|
+
- Note: Use the provided [docker-compose.yml](docker-setups/docker-compose.yml) for Quick multi-agent.
|
|
308
333
|
- Navigate to the folder: Use the cd command to enter the directory containing the docker-compose.yml file.
|
|
309
334
|
- ```
|
|
310
335
|
cd /path/to/your/folder
|
|
@@ -342,7 +367,7 @@ A. [=] Computational performance results with Transformer included during Advanc
|
|
|
342
367
|
14:50:36.109 449.89% 116.8MiB / 3.71GiB
|
|
343
368
|
14:50:38.123 423.56% 119MiB / 3.71GiB
|
|
344
369
|
```
|
|
345
|
-
- [=] Note: To read the full logs (For included Transformer performance): [performance_log_with_TF](performance_log_with_TF.txt)
|
|
370
|
+
- [=] Note: To read the full logs (For included Transformer performance): [performance_log_with_TF](performance_logs/performance_log_with_TF.txt)
|
|
346
371
|
- [=] Explanation:
|
|
347
372
|
- Average CPU Usage = 420% - 430% , Sustained roughlt 4.20 - 4.30 CPU Cores
|
|
348
373
|
- Meaning = - Compute-Intensive workload
|
|
@@ -379,7 +404,7 @@ B. [=] Advanced Prediction without Transformer, Only Specialized MLP + LSTM usin
|
|
|
379
404
|
10:02:16.873 98.84% 333.8MiB / 3.71GiB
|
|
380
405
|
10:02:18.869 0.00% 132.7MiB / 3.71GiB # container stopped and round 2 finished
|
|
381
406
|
```
|
|
382
|
-
- [=] Note: See full performance log in here: [performance_log_only_MLP](performance_log_only_MLP.txt)
|
|
407
|
+
- [=] Note: See full performance log in here: [performance_log_only_MLP](performance_logs/performance_log_only_MLP.txt)
|
|
383
408
|
- [=] Explanation:
|
|
384
409
|
- Average CPU Usage = 85-90% Used, sustained roughly 1 CPU Core saturated on average
|
|
385
410
|
- Meaning: - Very efficient computation
|
|
@@ -402,7 +427,9 @@ _______________________________________
|
|
|
402
427
|
## Source code of AbstractIntegratedModule
|
|
403
428
|
- Note: The source code is provided in the repository.
|
|
404
429
|
- [=] Full Monolithic extensively-documented source code (12K+ Lines): [AbstractIntegratedPipeline-SourceCode.zip](AbstractIntegratedPipeline-SourceCode.zip)
|
|
405
|
-
- [=] Separated Modules of AbstractIntegratedModule: [
|
|
430
|
+
- [=] Separated Modules of AbstractIntegratedModule: [separated-modules](separated-modules)
|
|
431
|
+
- [=] up-to-date Source code: [AbstractIntegratedModule.pyx](src/AbstractIntegratedModule.pyx) and [AbstractOptimizedModules.pyx](src/AbstractOptimizedModules.pyx) files for independent compilation or direct compiling on real ARM64 device or if you want to see the up-to-date, undocumented version of AbstractIntegratedModule library.
|
|
432
|
+
- [lib.rs](rust_optimization_setups/lib.rs) that contains Rust optimization for Models weight handling.
|
|
406
433
|
- [~] Note:
|
|
407
434
|
- The source code is open and Free to anyone who:
|
|
408
435
|
- Use it: Run the software for any personal, academic, or commercial purpose.
|
|
@@ -425,96 +452,70 @@ _______________________________________
|
|
|
425
452
|
python -m pip install AbstractIntegratedModule
|
|
426
453
|
```
|
|
427
454
|
|
|
428
|
-
1.
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
-
|
|
443
|
-
- Scikit-learn
|
|
444
|
-
- pandas
|
|
445
|
-
- aiohttp
|
|
446
|
-
- psutil
|
|
447
|
-
|
|
448
|
-
1. Clone repository:
|
|
449
|
-
- ```
|
|
450
|
-
# prerequisites (for Raspberry pi OS Only)
|
|
451
|
-
# Update system
|
|
452
|
-
sudo apt-get update
|
|
453
|
-
sudo apt-get upgrade -y
|
|
454
|
-
|
|
455
|
-
# Install Python 3.13 and development tools
|
|
456
|
-
sudo apt-get install python3.13 python3.13-dev python3.13-venv -y
|
|
457
|
-
|
|
458
|
-
# Install additional build tools
|
|
459
|
-
sudo apt-get install build-essential libatlas-base-dev libjasper-dev -y
|
|
460
|
-
|
|
461
|
-
# Clone immediately for Windows and x86_64 only without prerequisites
|
|
462
|
-
git clone https://github.com/Micro-Novelty/IntegratedPipeline-Continous-Learning-AI-Agent-library-framework.git
|
|
463
|
-
cd IntegratedPipeline-Continous-Learning-AI-Agent-library-framework
|
|
464
|
-
```
|
|
465
|
-
2. Install System Dependencies (for x86_64 installation):
|
|
466
|
-
```
|
|
467
|
-
# Ubuntu/Debian
|
|
468
|
-
sudo apt-get update
|
|
469
|
-
sudo apt-get install python3.13 python3.13-dev python3.13-venv
|
|
455
|
+
1. Clone repository:
|
|
456
|
+
|
|
457
|
+
- ```
|
|
458
|
+
# prerequisites (for Raspberry pi OS Only)
|
|
459
|
+
# Update system
|
|
460
|
+
sudo apt-get update
|
|
461
|
+
sudo apt-get upgrade -y
|
|
462
|
+
|
|
463
|
+
# Install Python 3.x and development tools
|
|
464
|
+
# Version 3.x means you can install python 3.10 to 3.13 only,
|
|
465
|
+
# choose one version specified for your needs (3.10 or 3.11 or 3.12 ...).
|
|
466
|
+
sudo apt-get install python3.x python3.x-dev python3.x-venv -y
|
|
467
|
+
|
|
468
|
+
# Install additional build tools
|
|
469
|
+
sudo apt-get install build-essential libatlas-base-dev libjasper-dev -y
|
|
470
470
|
|
|
471
|
-
|
|
472
|
-
|
|
471
|
+
# Clone immediately for Windows and x86_64 only without prerequisites
|
|
472
|
+
git clone https://github.com/Micro-Novelty/IntegratedPipeline-Continous-Learning-AI-Agent-library-framework.git
|
|
473
|
+
cd IntegratedPipeline-Continous-Learning-AI-Agent-library-framework
|
|
474
|
+
```
|
|
475
|
+
2. Install System Dependencies (for x86_64 installation):
|
|
476
|
+
```
|
|
477
|
+
# Ubuntu/Debian
|
|
478
|
+
# example with Version 3.10:
|
|
479
|
+
sudo apt-get update
|
|
480
|
+
sudo apt-get install python3.10 python3.10-dev python3.10-venv
|
|
481
|
+
|
|
482
|
+
# CentOS/RHEL
|
|
483
|
+
sudo yum install python310 python310-devel
|
|
473
484
|
|
|
474
|
-
|
|
475
|
-
|
|
485
|
+
# Fedora
|
|
486
|
+
sudo dnf install python3.10 python3.10-devel
|
|
487
|
+
```
|
|
488
|
+
|
|
489
|
+
3. Create a virtual environment:
|
|
490
|
+
- ```
|
|
491
|
+
# Create virtual environment (windows)
|
|
492
|
+
# example with python 3.10
|
|
493
|
+
python -m venv venv
|
|
494
|
+
# Activate virtual environment
|
|
495
|
+
venv\Scripts\activate
|
|
496
|
+
|
|
497
|
+
# Create virtual environment (x86_64) (ARM64 / raspberry pi)
|
|
498
|
+
python3.10 -m venv venv
|
|
499
|
+
# Activate virtual environment
|
|
500
|
+
source venv/bin/activate
|
|
501
|
+
```
|
|
502
|
+
|
|
503
|
+
|
|
504
|
+
4. Verify Installation:
|
|
505
|
+
- ```
|
|
506
|
+
python -c "from AbstractIntegratedModule import IntegratedPipeline; print('✓ Installation successful!')"
|
|
476
507
|
```
|
|
477
508
|
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
# Create virtual environment (x86_64) (ARM64 / raspberry pi)
|
|
486
|
-
python3.13 -m venv venv
|
|
487
|
-
# Activate virtual environment
|
|
488
|
-
source venv/bin/activate
|
|
489
|
-
```
|
|
490
|
-
|
|
491
|
-
4. Copy AbstractIntegratedModule binary:
|
|
492
|
-
- ```
|
|
493
|
-
# For windows:
|
|
494
|
-
# Copy the .pyd file to your project root
|
|
495
|
-
# AbstractIntegratedModule.pyd
|
|
496
|
-
copy C:\path\to\AbstractIntegratedModule.pyd .\AbstractIntegratedModule.pyd
|
|
497
|
-
|
|
498
|
-
# Copy the .so file to your project root (for x86_64)
|
|
499
|
-
cp /path/to/AbstractIntegratedModule.cpython-39-x86_64-linux-gnu.so ./AbstractIntegratedModule.cpython-39-x86_64-linux-gnu.so
|
|
500
|
-
|
|
501
|
-
# Copy ARM64 / Raspberry pi binary
|
|
502
|
-
cp /path/to/AbstractIntegratedModule.cpython-39-aarch64-linux-gnu.so ./AbstractIntegratedModule.cpython-39-aarch64-linux-gnu.so
|
|
503
|
-
|
|
504
|
-
5. Verify Installation:
|
|
505
|
-
- ```
|
|
506
|
-
python -c "from AbstractIntegratedModule import IntegratedPipeline; print('✓ Installation successful!')"
|
|
507
|
-
```
|
|
508
|
-
|
|
509
|
-
6. Run main.py for quick test of successful imports:
|
|
510
|
-
- ```
|
|
511
|
-
# run this for quick import test.
|
|
512
|
-
python main.py
|
|
513
|
-
```
|
|
509
|
+
5. Run main.py for quick test of successful imports:
|
|
510
|
+
- Download main.py in our repository code section: [main.py](main.py)
|
|
511
|
+
- ```
|
|
512
|
+
# run this for quick import test.
|
|
513
|
+
python main.py
|
|
514
|
+
```
|
|
514
515
|
|
|
515
516
|
|
|
516
517
|
|
|
517
|
-
3. Create CSV file that contains training labels and titles:
|
|
518
|
+
3. Create CSV file that contains training labels and titles (Optional for training using texts):
|
|
518
519
|
- Example format:
|
|
519
520
|
```txt
|
|
520
521
|
window_title,label
|
|
@@ -532,6 +533,7 @@ _______________________________________
|
|
|
532
533
|
```
|
|
533
534
|
Note = window_title is target_title and label is target_label, check step below to use it.
|
|
534
535
|
|
|
536
|
+
|
|
535
537
|
4. Use IntegratedPipeline as in this example:
|
|
536
538
|
```python
|
|
537
539
|
from AbstractIntegratedModule import IntegratedPipeline
|
|
@@ -545,11 +547,11 @@ _______________________________________
|
|
|
545
547
|
# SSL Setup for users who used Lets encrypt / Public CA cert:
|
|
546
548
|
# Server context
|
|
547
549
|
server_ctx = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)
|
|
548
|
-
server_ctx.load_cert_chain('
|
|
550
|
+
server_ctx.load_cert_chain('your_server.crt', 'your_server.key') # No load_verify_locations needed — OS trust store handles public CA
|
|
549
551
|
|
|
550
552
|
# Client context
|
|
551
553
|
client_ctx = ssl.create_default_context(ssl.Purpose.SERVER_AUTH)
|
|
552
|
-
client_ctx.load_cert_chain('
|
|
554
|
+
client_ctx.load_cert_chain('your_client.crt', 'your_client.key') # no load_verify_locations — OS trust store handles it
|
|
553
555
|
|
|
554
556
|
# for enterprise and internal CA:
|
|
555
557
|
'''
|
|
@@ -566,14 +568,14 @@ _______________________________________
|
|
|
566
568
|
client_ctx.check_hostname = False
|
|
567
569
|
''' # uncomment to use
|
|
568
570
|
|
|
569
|
-
# Note: The Above setup is Important for Secure P2P In deployment case, for local P2P the above setup is optional and automatic self-signed CERT will be used for local P2P.
|
|
571
|
+
# Note: The Above setup is Important for Users who wants to do Secure P2P In deployment case, for local P2P the above setup is optional and automatic self-signed CERT will be used for local-device P2P.
|
|
570
572
|
|
|
571
573
|
main_model = IntegratedPipeline(
|
|
572
574
|
memory_name=memory_name, # memory name for the AI you already initialized
|
|
573
575
|
use_async=True, # local asynchronous prediction is permitted, if not PipelineAsyncManager wont start asynchronous prediction.
|
|
574
576
|
agent_port=5001, # this port is used to set AgentDistributedInference server (optional)
|
|
575
577
|
ssl_cert_file=cert_file, ssl_key_file=key_file,# provide your cert_file path or key_file path (optional)
|
|
576
|
-
ssl_context=server_ctx, # used by the Agent server (optional)
|
|
578
|
+
ssl_context=server_ctx, # used by the Agent server. (optional)
|
|
577
579
|
client_ssl_context=client_ctx # used by the client. (optional)
|
|
578
580
|
)
|
|
579
581
|
|
|
@@ -613,7 +615,15 @@ _______________________________________
|
|
|
613
615
|
main_model.show_explainability_details = True
|
|
614
616
|
main_model.distribution.predict_manager = main_prediction # set PipelinePredictionManager to AgentDistributedInference for asynchronous prediction later (Very important for asynchronous prediction)
|
|
615
617
|
# main_model.use_transformer = True if you want to use transformer, this will notify all modules that used advanced_prediction_method will initiate prediction with both transformer and MLP.
|
|
616
|
-
|
|
618
|
+
|
|
619
|
+
# set IntegratedPipeline Penalty rate when it output wrong answer:
|
|
620
|
+
main_model.error_decay = 0.75
|
|
621
|
+
# error_rate > 0.5 means old errors fade quickly — a class that was wrong 3 predictions ago matters less than one wrong just now, making the model less likely to output repetitive wrong answer.
|
|
622
|
+
# this a flexible tunable-knob for the model judgement regarding wrong answer, this will propagate through prediction layers to inform about the model repetitive answer and calibrate it immediately.
|
|
623
|
+
|
|
624
|
+
main_model.mlp_training_epochs = 2000
|
|
625
|
+
main_model.transformer_training_epochs = 200
|
|
626
|
+
# You can set how much epochs are needed to Train your MLP and Transformer for your Models.
|
|
617
627
|
|
|
618
628
|
# test samples with more sophisticated rules and more complex titles for prediction
|
|
619
629
|
# (title, intent)
|
|
@@ -637,14 +647,24 @@ _______________________________________
|
|
|
637
647
|
# prevent the model from training and make weights unchanged for static prediction.
|
|
638
648
|
|
|
639
649
|
results, chosen_label, confidence = main_prediction.advanced_prediction_method(
|
|
640
|
-
test_titles, label_map, example_rules,
|
|
650
|
+
titles=test_titles, label_map=label_map, rules=example_rules, # titles and rules can be set to None (Optional samples), but label_map must NOT be None.
|
|
641
651
|
X=None, y=None # you could create your own X and y samples and put it here (Optional)
|
|
642
652
|
show_proba=False, top_k=3,
|
|
643
653
|
use_transformer=True,
|
|
644
654
|
return_attention=False,
|
|
645
655
|
save_results=True,
|
|
646
656
|
batch_size=2)
|
|
657
|
+
# Important Note: If you set titles and rules to None, you must provide X and y samples for prediction, otherwise the models cant predict anything.
|
|
647
658
|
# batch size=2 is needed during transformer training for batching, if you have larger samples consider using batch_size > 8, for medium amount of samples (>10 -> <50 samples) consider using 2 or 4 batch_size.
|
|
659
|
+
|
|
660
|
+
# This setup below would allow you to save the Accurate answer (if the model guessed a specific problem correct) directly to the database,
|
|
661
|
+
# without initiating prediction over the sample repeatedly.
|
|
662
|
+
input_ids = main_model.model2.cache['input_ids'] # input indices the transformer used as input (model2 is Transformer).
|
|
663
|
+
index = results.get('index') # predicted index where the Model have chosen the label.
|
|
664
|
+
confidence = results.get('confidence') # the model confidence over the predicted Output from advanced prediction method.
|
|
665
|
+
main_model.accurate_cache_lookup.add_verified(X, input_ids, chosen_label, confidence, index,
|
|
666
|
+
source='Correctly-Answered') # You can modify the the source with "Answered-Correctly" (fit to your needs)
|
|
667
|
+
|
|
648
668
|
# ... more features you can add
|
|
649
669
|
```
|
|
650
670
|
|
|
@@ -700,7 +720,10 @@ async_manager = PipelineAsyncManager(main_model,
|
|
|
700
720
|
|
|
701
721
|
async_manager.start(method='Transformer_included', bootstrap_token=None) # boothstrap token is optional for better security
|
|
702
722
|
|
|
703
|
-
texts = {'test_titles': test_titles, 'label_map': label_map, 'rules': example_rules,
|
|
723
|
+
texts = {'test_titles': test_titles, 'label_map': label_map, 'rules': example_rules, # test_titles and rules can be set to None here since they are Optional samples.
|
|
724
|
+
# but label_map must not be None.
|
|
725
|
+
'X': None, 'y':None, 'use_transformer': True} # all samples needed for advanced prediction method. (X and y are optional samples)
|
|
726
|
+
# Important Note: If you set titles and rules to None, you must provide X and y samples for prediction, otherwise the models cant predict anything.
|
|
704
727
|
|
|
705
728
|
regular_predict = async_manager.predict(
|
|
706
729
|
texts=texts,
|
|
@@ -710,11 +733,12 @@ regular_predict = async_manager.predict(
|
|
|
710
733
|
|
|
711
734
|
# with retries: async_manager.predict(texts, timeout=60, retries=5, api_key=secret_key) # 5 times retry if failed
|
|
712
735
|
|
|
736
|
+
# NOTE: This function below must require test_titles or titles, label_map and example rules:
|
|
713
737
|
print('[==] Initiating advanced batch prediction')
|
|
714
738
|
predicted_output = async_manager.advanced_batch_prediction(test_titles, label_map, example_rules,
|
|
715
739
|
X=None, y=None, # provide your initialized X and y samples (Also Optional, can be set to None)
|
|
716
740
|
secret_key=secret_key, client_ip=None) # you can add client_ip to provide a robust authentication paired with secret_key
|
|
717
|
-
# for better and faster advanced prediction, consider using advanced batch prediction like in the above example
|
|
741
|
+
# for better and faster advanced prediction when using titles and rules, consider using advanced batch prediction like in the above example
|
|
718
742
|
|
|
719
743
|
```
|
|
720
744
|
[=] Note:
|
|
@@ -819,7 +843,9 @@ try:
|
|
|
819
843
|
api_key = agent1.get_api_key()
|
|
820
844
|
print(f"\n🔑 Using API Key: {api_key[:20]}...")
|
|
821
845
|
|
|
822
|
-
texts = {"test_titles": test_titles, "label_map": label_map, "rules": rules,
|
|
846
|
+
texts = {"test_titles": test_titles, "label_map": label_map, "rules": rules, # test_titles and rules are Optional samples, can be set to None.
|
|
847
|
+
'X': None, "y":None, "use_transformer": True, "agent_id": agent_id} # (X and y are optional samples here too)
|
|
848
|
+
# Important Note: If you set titles and rules to None, you must provide X and y samples for prediction, otherwise the models cant predict anything.
|
|
823
849
|
|
|
824
850
|
# texts dictionary must contain test_titles, label_map, and rules that you can assign,
|
|
825
851
|
# agent ID can be strings, int, or floats, recommendded to make it long for better security.
|
|
@@ -877,7 +903,7 @@ finally:
|
|
|
877
903
|
- This setup used Hybrid feature in prediction handling, Asynchronous prediction request, and Synchronous prediction handling. Synchronous prediction does block code execution for a few seconds, it was used for a few reason here, such as:
|
|
878
904
|
- allowing a more slower traffic between agents, preventing other agent to get the same peer prediction over time, making each interaction equals and each peer can receive different peer prediction output.
|
|
879
905
|
|
|
880
|
-
[=] You can download this setup here for a direct test: [P2PDirectTest.py](P2PDirectTest.py)
|
|
906
|
+
[=] You can download this setup here for a direct test: [P2PDirectTest.py](P2P_Setups/P2PDirectTest.py)
|
|
881
907
|
|
|
882
908
|
- [=] for probability coordination, locally, get peers data from database or via socket.
|
|
883
909
|
```python
|
|
@@ -936,8 +962,8 @@ calibrated_probability = main_model._handle_distributed_connections(probs, attn_
|
|
|
936
962
|
```
|
|
937
963
|
[~] Note: this calibrated_probability is later used to calculate confidence and chosen output based on given label_map.
|
|
938
964
|
- Consider checking:
|
|
939
|
-
- [multi_agent_client.py](multi_agent_client.py) for a In-depth start for client testing.
|
|
940
|
-
- [multi_agent_server.py](multi_agent_server.py) for a In-depth start for server testing.
|
|
965
|
+
- [multi_agent_client.py](P2P_Setups/multi_agent_client.py) for a In-depth start for client testing.
|
|
966
|
+
- [multi_agent_server.py](P2P_Setups/multi_agent_server.py) for a In-depth start for server testing.
|
|
941
967
|
- If you get undefined NoneType Behavior when using .accept(), consider see [Troubleshooting](#Troubleshooting) Issue 7 for a Quick fix.
|
|
942
968
|
|
|
943
969
|
6. Cross-Session availability:
|
|
@@ -1191,7 +1217,7 @@ purpose: handles Proper LSTM Confidence and calibration layer.
|
|
|
1191
1217
|
- [ROADMAP.md](ROADMAP.md)
|
|
1192
1218
|
- [Contributing.md](Contributing.md)
|
|
1193
1219
|
- [changelog.md](changelog.md)
|
|
1194
|
-
- [requirements-
|
|
1220
|
+
- [requirements-For-Dev](dev_needs.txt) for contributors requirements.
|
|
1195
1221
|
- [architecture_diagram.js](architecture_diagram.js).
|
|
1196
1222
|
|
|
1197
1223
|
## License
|