AbstractIntegratedModule 1.2.6__tar.gz → 1.2.8__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 (23) hide show
  1. {abstractintegratedmodule-1.2.6 → abstractintegratedmodule-1.2.8}/AbstractIntegratedModule.egg-info/PKG-INFO +1 -1
  2. {abstractintegratedmodule-1.2.6 → abstractintegratedmodule-1.2.8}/AbstractIntegratedModule.py +23 -21
  3. {abstractintegratedmodule-1.2.6 → abstractintegratedmodule-1.2.8}/AbstractOptimizedModules.c +200 -200
  4. {abstractintegratedmodule-1.2.6 → abstractintegratedmodule-1.2.8}/PKG-INFO +1 -1
  5. {abstractintegratedmodule-1.2.6 → abstractintegratedmodule-1.2.8}/README.md +5 -2
  6. {abstractintegratedmodule-1.2.6 → abstractintegratedmodule-1.2.8}/pyproject.toml +1 -1
  7. {abstractintegratedmodule-1.2.6 → abstractintegratedmodule-1.2.8}/setup.py +1 -1
  8. {abstractintegratedmodule-1.2.6 → abstractintegratedmodule-1.2.8}/AbstractIntegratedModule.egg-info/SOURCES.txt +0 -0
  9. {abstractintegratedmodule-1.2.6 → abstractintegratedmodule-1.2.8}/AbstractIntegratedModule.egg-info/dependency_links.txt +0 -0
  10. {abstractintegratedmodule-1.2.6 → abstractintegratedmodule-1.2.8}/AbstractIntegratedModule.egg-info/requires.txt +0 -0
  11. {abstractintegratedmodule-1.2.6 → abstractintegratedmodule-1.2.8}/AbstractIntegratedModule.egg-info/top_level.txt +0 -0
  12. {abstractintegratedmodule-1.2.6 → abstractintegratedmodule-1.2.8}/AbstractOptimizedModules.pyx +0 -0
  13. {abstractintegratedmodule-1.2.6 → abstractintegratedmodule-1.2.8}/MANIFEST.in +0 -0
  14. {abstractintegratedmodule-1.2.6 → abstractintegratedmodule-1.2.8}/abstract_model_storage/Cargo.toml +0 -0
  15. {abstractintegratedmodule-1.2.6 → abstractintegratedmodule-1.2.8}/abstract_model_storage/pyproject.toml +0 -0
  16. {abstractintegratedmodule-1.2.6 → abstractintegratedmodule-1.2.8}/abstract_model_storage/src/lib.rs +0 -0
  17. {abstractintegratedmodule-1.2.6 → abstractintegratedmodule-1.2.8}/abstract_model_storage/target/debug/build/libsqlite3-sys-ed07b882cd2aa5e2/out/bindgen.rs +0 -0
  18. {abstractintegratedmodule-1.2.6 → abstractintegratedmodule-1.2.8}/abstract_model_storage/target/debug/build/serde_core-ebc15f2e9cad7f5f/out/private.rs +0 -0
  19. {abstractintegratedmodule-1.2.6 → abstractintegratedmodule-1.2.8}/abstract_model_storage/target/debug/build/target-lexicon-08527f45de28143d/out/host.rs +0 -0
  20. {abstractintegratedmodule-1.2.6 → abstractintegratedmodule-1.2.8}/abstract_model_storage/target/release/build/libsqlite3-sys-bf0400df4523274c/out/bindgen.rs +0 -0
  21. {abstractintegratedmodule-1.2.6 → abstractintegratedmodule-1.2.8}/abstract_model_storage/target/release/build/serde_core-5cdb76131825e4af/out/private.rs +0 -0
  22. {abstractintegratedmodule-1.2.6 → abstractintegratedmodule-1.2.8}/abstract_model_storage/target/release/build/target-lexicon-43eb95a0588bf457/out/host.rs +0 -0
  23. {abstractintegratedmodule-1.2.6 → abstractintegratedmodule-1.2.8}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: AbstractIntegratedModule
3
- Version: 1.2.6
3
+ Version: 1.2.8
4
4
  Summary: Integrated Pipeline with Specialized Non-LLM AI Agent Framework for ARM64 architecture
5
5
  Author: Micro-Novelty
6
6
  Author-email: Micro-Novelty <hernikpuspita5@gmail.com>
@@ -10981,23 +10981,29 @@ class AgentDistributedInference:
10981
10981
  rules = payload.get('rules')
10982
10982
  X = payload.get('X')
10983
10983
  y = payload.get('y')
10984
+
10984
10985
 
10985
10986
  # Sanitize if needed
10986
10987
  if test_titles:
10988
+ print('[P2P INFO] Sanitizing titles for potential unsupported format...')
10987
10989
  test_titles = self._sanitize_structured(test_titles)
10988
10990
  if label_map:
10991
+ print('[P2P INFO] Sanitizing label map for potential unsupported format...')
10989
10992
  label_map = self._sanitize_structured(label_map)
10993
+ if label_map is None or not isinstance(label_map, dict):
10994
+ raise ValueError('[>] Label map is None or invalid label map instance!')
10995
+
10996
+
10990
10997
  if rules:
10998
+ print('[P2P INFO] Sanitizing rules for potential unsupported format...')
10991
10999
  rules = self._sanitize_structured(rules)
10992
11000
  if X is not None:
11001
+ print('[P2P INFO] Sanitizing X sample for Potential strings...')
10993
11002
  X = self._sanitize_structured(X)
10994
11003
  if y is not None:
11004
+ print('[P2P INFO] Sanitizing y sample for Potential strings...')
10995
11005
  y = self._sanitize_structured(y)
10996
11006
 
10997
- if X is None or y is None:
10998
- print('[=] Got necessary titles, label_map and rules.')
10999
- else:
11000
- print('[=] Got necessary titles, label_map, rules and X And Y samples.')
11001
11007
  else:
11002
11008
  text = payload.get('text')
11003
11009
  if text:
@@ -11008,9 +11014,8 @@ class AgentDistributedInference:
11008
11014
  text = str(payload) if payload else None
11009
11015
 
11010
11016
  if not text and not test_titles:
11011
- print('[===] ERROR: No text or test_titles in message payload!')
11012
- return {'type': self.MSG_TYPES['PREDICT_RESPONSE'], 'error': 'No text or test_titles provided'}
11013
-
11017
+ print('[INFO] No text or test_titles in message payload.')
11018
+
11014
11019
  # Run the actual prediction
11015
11020
  print(f'[=] Initiating prediction method')
11016
11021
  try:
@@ -11042,7 +11047,7 @@ class AgentDistributedInference:
11042
11047
  }
11043
11048
 
11044
11049
  else:
11045
- print('[=] Initaiting basic prediction...')
11050
+ print('[=] Iniatiting basic prediction...')
11046
11051
  result = await asyncio.to_thread(self.pipeline.predict_single, text)
11047
11052
 
11048
11053
  return {
@@ -13342,16 +13347,16 @@ class IntegratedPipeline:
13342
13347
  if value.shape[0] != num_classes and \
13343
13348
  (value.ndim < 2 or value.shape[1] != num_classes):
13344
13349
  return (True,
13345
- f"Array shape {value.shape} doesn't match "
13350
+ f"[>] Array shape {value.shape} doesn't match "
13346
13351
  f"{num_classes} classes in key '{key}'",
13347
13352
  "Hybrid feature stored incorrectly, clear entry")
13348
13353
  if value.size == 0:
13349
13354
  return (True,
13350
- f"Empty array in key '{key}'",
13355
+ f"[>] Empty array in key '{key}'",
13351
13356
  "Corrupted array, clear entry")
13352
13357
  if not np.isfinite(value).all():
13353
13358
  return (True,
13354
- f"NaN/Inf values in array at key '{key}'",
13359
+ f"[>] NaN/Inf values in array at key '{key}'",
13355
13360
  "Corrupted values, clear entry")
13356
13361
 
13357
13362
  # validate tuple values in dict
@@ -13361,10 +13366,10 @@ class IntegratedPipeline:
13361
13366
  )
13362
13367
  if corrupted:
13363
13368
  return (True,
13364
- f"Corrupted tuple value at key '{key}': {reason}",
13369
+ f"[>] Corrupted tuple value at key '{key}': {reason}",
13365
13370
  fix)
13366
13371
 
13367
- return (False, "Valid dict structure", None)
13372
+ return (False, "[>] Valid dict structure", None)
13368
13373
 
13369
13374
 
13370
13375
  def initialize_fitting(self, text):
@@ -13383,23 +13388,22 @@ class IntegratedPipeline:
13383
13388
  unique_in_batch = len(np.unique(y_raw))
13384
13389
 
13385
13390
  if num_classes is None:
13386
- # no model exists yet — this is the legitimate case where
13391
+ # no model exists — this is the legitimate case where
13387
13392
  # inferring from y_raw is correct (e.g. first-time initialization)
13388
13393
  num_classes = unique_in_batch
13389
13394
  print(f'[=] No existing model — initializing with {num_classes} classes '
13390
13395
  f'from this batch')
13391
13396
  elif unique_in_batch > num_classes:
13392
- # batch contains MORE classes than the model supports
13393
- # this is a real problem — can't onehot-encode into a smaller space
13397
+ # batch contains more classes than the model supports
13398
+ # a problem — can't onehot-encode into a smaller space
13394
13399
  print(f'[⚠️] Batch contains {unique_in_batch} unique classes but model '
13395
13400
  f'only supports {num_classes} — expanding to {unique_in_batch}')
13396
13401
  num_classes = unique_in_batch
13397
13402
  elif unique_in_batch < num_classes:
13398
13403
  # batch just doesn't happen to contain all classes.
13399
- # use the model's full num_classes so onehot stays the right width
13404
+ # use model's full num_classes so onehot stays the right width
13400
13405
  print(f'[=] Batch only contains {unique_in_batch}/{num_classes} classes '
13401
13406
  f'— using full model class count for onehot width')
13402
- # num_classes stays as the model's true value, no change needed
13403
13407
 
13404
13408
  y_onehot = np.zeros((len(y_raw), num_classes))
13405
13409
 
@@ -13410,8 +13414,6 @@ class IntegratedPipeline:
13410
13414
  else:
13411
13415
  print(f'[⚠️] Label {label_idx} out of range for {num_classes} classes '
13412
13416
  f'at sample {idx} — skipping onehot assignment')
13413
- # leaves that row as all-zeros rather than crashing or
13414
- # silently assigning to a wrong class
13415
13417
 
13416
13418
  return y_onehot
13417
13419
 
@@ -23487,7 +23489,7 @@ class PipelinePredictionManager:
23487
23489
 
23488
23490
  if mlp_pred is not None and mlp_conf > 0.0:
23489
23491
  print(f'[🎯] MLP Prediction: {mlp_pred} || with confidence: {mlp_conf}')
23490
- if self.pipeline.use_lstm:
23492
+ if self.pipeline.use_lstm and lstm_pred is not None:
23491
23493
  print(f'[⚡] LSTM Predictions: {lstm_pred[:top_k]} || with distributed confidence: {lstm_conf}')
23492
23494
  print(f'[⚡] LSTM Uncertainty: {uncertainty}')
23493
23495
  print(f'[⚡] LSTM Overall Confidence: {overall_conf}')