AbstractIntegratedModule 0.5.5__tar.gz → 0.6.0__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.
Files changed (21) hide show
  1. abstractintegratedmodule-0.6.0/AbstractIntegratedModule.cp313-win_amd64.pyd +0 -0
  2. {abstractintegratedmodule-0.5.5 → abstractintegratedmodule-0.6.0}/AbstractIntegratedModule.cpython-310-aarch64-linux-gnu.so +0 -0
  3. {abstractintegratedmodule-0.5.5 → abstractintegratedmodule-0.6.0}/AbstractIntegratedModule.cpython-312-x86_64-linux-gnu.so +0 -0
  4. {abstractintegratedmodule-0.5.5 → abstractintegratedmodule-0.6.0/AbstractIntegratedModule.egg-info}/PKG-INFO +8 -4
  5. {abstractintegratedmodule-0.5.5 → abstractintegratedmodule-0.6.0}/AbstractIntegratedModule.py +92 -22
  6. {abstractintegratedmodule-0.5.5 → abstractintegratedmodule-0.6.0}/AbstractOptimizedModules.c +152 -152
  7. {abstractintegratedmodule-0.5.5/AbstractIntegratedModule.egg-info → abstractintegratedmodule-0.6.0}/PKG-INFO +8 -4
  8. {abstractintegratedmodule-0.5.5 → abstractintegratedmodule-0.6.0}/README.md +7 -3
  9. {abstractintegratedmodule-0.5.5 → abstractintegratedmodule-0.6.0}/setup.py +1 -1
  10. abstractintegratedmodule-0.5.5/AbstractIntegratedModule.cp313-win_amd64.pyd +0 -0
  11. {abstractintegratedmodule-0.5.5 → abstractintegratedmodule-0.6.0}/AbstractIntegratedModule.egg-info/SOURCES.txt +0 -0
  12. {abstractintegratedmodule-0.5.5 → abstractintegratedmodule-0.6.0}/AbstractIntegratedModule.egg-info/dependency_links.txt +0 -0
  13. {abstractintegratedmodule-0.5.5 → abstractintegratedmodule-0.6.0}/AbstractIntegratedModule.egg-info/requires.txt +0 -0
  14. {abstractintegratedmodule-0.5.5 → abstractintegratedmodule-0.6.0}/AbstractIntegratedModule.egg-info/top_level.txt +0 -0
  15. {abstractintegratedmodule-0.5.5 → abstractintegratedmodule-0.6.0}/AbstractOptimizedModules.cp313-win_amd64.pyd +0 -0
  16. {abstractintegratedmodule-0.5.5 → abstractintegratedmodule-0.6.0}/AbstractOptimizedModules.cpython-310-aarch64-linux-gnu.so +0 -0
  17. {abstractintegratedmodule-0.5.5 → abstractintegratedmodule-0.6.0}/AbstractOptimizedModules.cpython-312-x86_64-linux-gnu.so +0 -0
  18. {abstractintegratedmodule-0.5.5 → abstractintegratedmodule-0.6.0}/AbstractOptimizedModules.pyx +0 -0
  19. {abstractintegratedmodule-0.5.5 → abstractintegratedmodule-0.6.0}/MANIFEST.in +0 -0
  20. {abstractintegratedmodule-0.5.5 → abstractintegratedmodule-0.6.0}/pyproject.toml +0 -0
  21. {abstractintegratedmodule-0.5.5 → abstractintegratedmodule-0.6.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: AbstractIntegratedModule
3
- Version: 0.5.5
3
+ Version: 0.6.0
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
@@ -42,7 +42,7 @@ https://github.com/Micro-Novelty/IntegratedPipeline-Specialized-Non-LLM-AI-Agent
42
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
43
 
44
44
  ### Library Short Description:
45
- - Development Stage: Beta, 0.5.5.
45
+ - Development Stage: 0.6.0 Official Release.
46
46
  - Maintainer: Micro-Novelty.
47
47
  - library Source-Code is Open-sourced on github.
48
48
  - Purpose: Specifically Designed for providing Non-LLM AI Agent Framework for edge Devices, Optimized for ARM64 architecture.
@@ -59,6 +59,7 @@ https://github.com/Micro-Novelty/IntegratedPipeline-Specialized-Non-LLM-AI-Agent
59
59
  if you don't have the necessary python, don't worry since you could use our regular pip download.
60
60
 
61
61
  - Proven Capabilities:
62
+ - The library has been thoroughly tested in Multiple Environments from Windows to ARM64 Environment. The library is now Robust for Wider use and Deployment.
62
63
  - Proven Works on ARM64 Environment, Training and Prediction works efficient on Docker ARM64 environment with QEMU, good parallelizing behavior is guaranteed.
63
64
  - P2P Works efficiently in ARM64 Docker + QEMU, No conflicting socket and all prediction works efficiently.
64
65
  - AWE setup Proven Efficient on Hard-uncontrolled dataset such as Activity Recognition from the given Database.
@@ -66,12 +67,13 @@ https://github.com/Micro-Novelty/IntegratedPipeline-Specialized-Non-LLM-AI-Agent
66
67
  - Robust Advanced prediction capabilities proven effective on ARM64 Using MLP + LSTM Architectures.
67
68
  - Transformer Modules Optimized using Cython, to reduce Memory overhead and Reduce CPU Usage, With Reduced Training Time.
68
69
  - Changelog:
69
- - v0.5.5:
70
+ - v0.6.0:
70
71
  - [=] New features:
71
72
  - Added Anisotropy measurement optimization in Cython to handle complex logic.
72
73
  - Added Cython softmax for Transformer to reduce CPU consumption.
73
74
  - Added Cython Cosine similarity to reduce ensemble prediction time needed for prediction.
74
75
  - Added safety guards for Cosine similarity to prevent string arrays to cause further errors.
76
+ - Refined csv load labels function to accept path dir, so users can finnaly find their Training labels without much restrictions and errors.
75
77
 
76
78
 
77
79
  -----
@@ -545,7 +547,9 @@ _______________________________________
545
547
 
546
548
  main_prediction = PipelinePredictionManager(
547
549
  main_model, # your initialized pipeline
548
- label_csv='example_manual_training.txt', # your .txt file that contains CSV format.
550
+ label_csv='C:/users/yourdevice/example_manual_training.txt',
551
+ # or /home/yourdevice/example_manual_training.txt.
552
+ #your path dir that contains the .txt file that contains CSV format.
549
553
  target_title='window_title', label='label')
550
554
 
551
555
  # example_manual_training is a .txt file that contain csv format like above example.
@@ -41,6 +41,7 @@ import aiohttp
41
41
  import psutil
42
42
  from sklearn.preprocessing import StandardScaler
43
43
  import io
44
+ from importlib import resources
44
45
 
45
46
  # Optimized Modules In Cython implementation.
46
47
  try:
@@ -12190,33 +12191,102 @@ class PipelinePredictionManager:
12190
12191
  print(f"✅ Loaded {len(self.titles)} labeled examples")
12191
12192
 
12192
12193
  def load_labels_from_csv(self, filename, target_title, label):
12193
- script_dir = os.path.dirname(os.path.abspath(__file__))
12194
- filepath = os.path.join(script_dir, filename)
12195
-
12196
- if not os.path.exists(filepath):
12197
- print(f"❌ File not found: {filepath}")
12194
+ """
12195
+ Load CSV from multiple common locations — no need to place
12196
+ file next to the script.
12197
+
12198
+ Search order:
12199
+ 1. Absolute path (if filename is already absolute)
12200
+ 2. Current working directory
12201
+ 3. Script directory
12202
+ 4. User home directory
12203
+ 5. Common data folders (Downloads, Documents, Desktop)
12204
+ """
12205
+ import os
12206
+ import sys
12207
+
12208
+ # build candidate paths
12209
+ candidates = []
12210
+
12211
+ # 1 — absolute path as-is
12212
+ if os.path.isabs(filename):
12213
+ candidates.append(filename)
12214
+ else:
12215
+ # 2 — current working directory
12216
+ candidates.append(os.path.join(os.getcwd(), filename))
12217
+
12218
+ # 3 — script directory
12219
+ try:
12220
+ script_dir = os.path.dirname(os.path.abspath(__file__))
12221
+ candidates.append(os.path.join(script_dir, filename))
12222
+ except NameError:
12223
+ pass
12224
+
12225
+ # 4 — home directory
12226
+ candidates.append(os.path.join(os.path.expanduser('~'), filename))
12227
+
12228
+ # 5 — common data folders
12229
+ home = os.path.expanduser('~')
12230
+ for folder in ['Downloads', 'Documents', 'Desktop', 'Data', 'data']:
12231
+ candidates.append(os.path.join(home, folder, filename))
12232
+
12233
+ # 6 — sys.path entries (useful in notebooks)
12234
+ for p in sys.path:
12235
+ if p:
12236
+ candidates.append(os.path.join(p, filename))
12237
+
12238
+ # find first existing path
12239
+ filepath = None
12240
+ for candidate in candidates:
12241
+ if os.path.exists(candidate):
12242
+ filepath = candidate
12243
+ break
12244
+
12245
+ if filepath is None:
12246
+ print(f"❌ Could not find '{filename}' in any of these locations:")
12247
+ for c in candidates[:6]: # show first 6 only
12248
+ print(f" {c}")
12249
+ print(f"\n💡 Tip: place your CSV in one of these folders or pass the full path:")
12250
+ print(f" {os.getcwd()}\\{filename}")
12251
+ print(f" {os.path.expanduser('~')}\\Downloads\\{filename}")
12198
12252
  return [], [], {}
12199
-
12200
- # Read CSV file
12201
- df = pd.read_csv(filepath)
12202
-
12253
+
12254
+ print(f"✅ Found CSV at: {filepath}")
12255
+
12256
+ try:
12257
+ df = pd.read_csv(filepath)
12258
+ except Exception as e:
12259
+ print(f"❌ Failed to read CSV: {e}")
12260
+ return [], [], {}
12261
+
12262
+ # validate columns exist
12263
+ missing = [c for c in [target_title, label] if c not in df.columns]
12264
+ if missing:
12265
+ print(f"❌ Missing columns: {missing}")
12266
+ print(f" Available columns: {list(df.columns)}")
12267
+ return [], [], {}
12268
+
12203
12269
  print(f"✅ Loaded CSV with columns: {list(df.columns)}")
12204
-
12205
- # Extract titles and labels
12206
- titles = df[target_title].tolist()
12207
- string_labels = df[label].tolist()
12208
-
12209
- # Remove quotes if they're still there
12210
- titles = [t.strip('"') for t in titles]
12211
-
12270
+
12271
+ # drop rows with missing values in target columns
12272
+ before = len(df)
12273
+ df = df.dropna(subset=[target_title, label])
12274
+ dropped = before - len(df)
12275
+ if dropped > 0:
12276
+ print(f"⚠️ Dropped {dropped} rows with missing values")
12277
+
12278
+ # extract and clean
12279
+ titles = df[target_title].astype(str).str.strip('"').tolist()
12280
+ string_labels = df[label].astype(str).tolist()
12281
+
12212
12282
  print(f"📊 Found {len(titles)} examples")
12213
12283
  print(f"📊 Labels: {set(string_labels)}")
12214
-
12215
- # Create numeric labels
12284
+
12285
+ # create numeric label map
12216
12286
  unique_labels = sorted(set(string_labels))
12217
- label_map = {label: i for i, label in enumerate(unique_labels)}
12218
- y = [label_map[label] for label in string_labels]
12219
-
12287
+ label_map = {lbl: i for i, lbl in enumerate(unique_labels)}
12288
+ y = [label_map[lbl] for lbl in string_labels]
12289
+
12220
12290
  return titles, y, label_map
12221
12291
 
12222
12292