AbstractIntegratedModule 1.3.5__tar.gz → 1.3.6__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.3.5 → abstractintegratedmodule-1.3.6}/AbstractIntegratedModule.egg-info/PKG-INFO +1 -1
  2. {abstractintegratedmodule-1.3.5 → abstractintegratedmodule-1.3.6}/AbstractIntegratedModule.py +45 -26
  3. {abstractintegratedmodule-1.3.5 → abstractintegratedmodule-1.3.6}/AbstractOptimizedModules.c +6 -6
  4. {abstractintegratedmodule-1.3.5 → abstractintegratedmodule-1.3.6}/PKG-INFO +1 -1
  5. {abstractintegratedmodule-1.3.5 → abstractintegratedmodule-1.3.6}/pyproject.toml +1 -1
  6. {abstractintegratedmodule-1.3.5 → abstractintegratedmodule-1.3.6}/setup.py +1 -1
  7. {abstractintegratedmodule-1.3.5 → abstractintegratedmodule-1.3.6}/AbstractIntegratedModule.egg-info/SOURCES.txt +0 -0
  8. {abstractintegratedmodule-1.3.5 → abstractintegratedmodule-1.3.6}/AbstractIntegratedModule.egg-info/dependency_links.txt +0 -0
  9. {abstractintegratedmodule-1.3.5 → abstractintegratedmodule-1.3.6}/AbstractIntegratedModule.egg-info/requires.txt +0 -0
  10. {abstractintegratedmodule-1.3.5 → abstractintegratedmodule-1.3.6}/AbstractIntegratedModule.egg-info/top_level.txt +0 -0
  11. {abstractintegratedmodule-1.3.5 → abstractintegratedmodule-1.3.6}/AbstractOptimizedModules.pyx +0 -0
  12. {abstractintegratedmodule-1.3.5 → abstractintegratedmodule-1.3.6}/MANIFEST.in +0 -0
  13. {abstractintegratedmodule-1.3.5 → abstractintegratedmodule-1.3.6}/README.md +0 -0
  14. {abstractintegratedmodule-1.3.5 → abstractintegratedmodule-1.3.6}/abstract_model_storage/Cargo.toml +0 -0
  15. {abstractintegratedmodule-1.3.5 → abstractintegratedmodule-1.3.6}/abstract_model_storage/pyproject.toml +0 -0
  16. {abstractintegratedmodule-1.3.5 → abstractintegratedmodule-1.3.6}/abstract_model_storage/src/lib.rs +0 -0
  17. {abstractintegratedmodule-1.3.5 → abstractintegratedmodule-1.3.6}/abstract_model_storage/target/debug/build/libsqlite3-sys-ed07b882cd2aa5e2/out/bindgen.rs +0 -0
  18. {abstractintegratedmodule-1.3.5 → abstractintegratedmodule-1.3.6}/abstract_model_storage/target/debug/build/serde_core-ebc15f2e9cad7f5f/out/private.rs +0 -0
  19. {abstractintegratedmodule-1.3.5 → abstractintegratedmodule-1.3.6}/abstract_model_storage/target/debug/build/target-lexicon-08527f45de28143d/out/host.rs +0 -0
  20. {abstractintegratedmodule-1.3.5 → abstractintegratedmodule-1.3.6}/abstract_model_storage/target/release/build/libsqlite3-sys-bf0400df4523274c/out/bindgen.rs +0 -0
  21. {abstractintegratedmodule-1.3.5 → abstractintegratedmodule-1.3.6}/abstract_model_storage/target/release/build/serde_core-5cdb76131825e4af/out/private.rs +0 -0
  22. {abstractintegratedmodule-1.3.5 → abstractintegratedmodule-1.3.6}/abstract_model_storage/target/release/build/target-lexicon-43eb95a0588bf457/out/host.rs +0 -0
  23. {abstractintegratedmodule-1.3.5 → abstractintegratedmodule-1.3.6}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: AbstractIntegratedModule
3
- Version: 1.3.5
3
+ Version: 1.3.6
4
4
  Summary: IntegratedPipeline Specifically provide a Framework to build Stateful continual learning Machine Learning Models optimized for Edge devices (ARM64).
5
5
  Author: Micro-Novelty
6
6
  Author-email: Micro-Novelty <hernikpuspita5@gmail.com>
@@ -5169,6 +5169,10 @@ class MLP:
5169
5169
  def continuous_predictive_correction(self, manager, prob, predicted_index, AME=None, anisotropy=None):
5170
5170
  eps = 1e-5
5171
5171
  label_map = manager.label_map
5172
+ if label_map is None:
5173
+ print('[>] Label map is None, returning probabilities as is...')
5174
+ return prob
5175
+
5172
5176
  n_classes = len(label_map)
5173
5177
  manager._repair_class_counters(n_classes) # guarantees valid 1-D counters
5174
5178
 
@@ -8883,16 +8887,20 @@ class ModelStorage:
8883
8887
 
8884
8888
  # dynamic corruption check
8885
8889
  if isinstance(value, list):
8886
- arr = np.asarray(value)
8887
- if arr.ndim > 2:
8888
- print(f'[!] Corrupted value for key {key} '
8889
- f'(ndim={arr.ndim}), removing')
8890
- continue
8891
-
8892
- if num_classes > 0 and arr.ndim == 1 and \
8893
- len(arr) not in (num_classes, num_classes * 2):
8894
- print(f'[!] Suspicious shape for key {key}: '
8895
- f'{arr.shape}, expected {num_classes} — removing')
8890
+ try:
8891
+ arr = np.asarray(value)
8892
+ if arr.ndim > 2:
8893
+ print(f'[!] Corrupted value for key {key} '
8894
+ f'(ndim={arr.ndim}), removing')
8895
+ continue
8896
+
8897
+ if num_classes > 0 and arr.ndim == 1 and \
8898
+ len(arr) not in (num_classes, num_classes * 2):
8899
+ print(f'[!] Suspicious shape for key {key}: '
8900
+ f'{arr.shape}, expected {num_classes} — removing')
8901
+ continue
8902
+ except Exception as e:
8903
+ print(f'[>] Cannot determine value: {e}')
8896
8904
  continue
8897
8905
 
8898
8906
  # None values — skipped silently
@@ -13966,7 +13974,7 @@ class IntegratedPipeline:
13966
13974
  def _validate_dict_memory(self, memory: dict, num_classes: int) -> tuple:
13967
13975
  """Validate dict memory — expected primary format."""
13968
13976
  if not memory:
13969
- return (False, "Empty dict (no memory yet)", None)
13977
+ return (False, "Empty dict (no memory)", None)
13970
13978
 
13971
13979
  valid_keys = {'TW', 'MW', 'TP', 'MP', 'TA', 'local',
13972
13980
  '_cached_probs', '_data'}
@@ -18520,23 +18528,29 @@ class AccurateAnswerCache:
18520
18528
  'added_at' : datetime.now().isoformat(),
18521
18529
  'last_hit' : None
18522
18530
  }
18523
-
18524
- self.cache[key] = entry
18525
-
18531
+ if self.cache is not None:
18532
+ if isinstance(self.cache, dict):
18533
+ self.cache[key] = entry
18534
+ print(f'[💎] Verified answer successfully cached: {prediction} (source={source})')
18535
+ else:
18536
+ print(f'[!] cache is not a dictionary! possible corruption during memory retrieval!')
18537
+
18526
18538
  # maintain O(1) exact match index
18527
18539
  if ids_hash is not None:
18528
18540
  self.exact_hash_index[ids_hash] = key
18529
18541
 
18530
- if len(self.cache) > self.max_size:
18531
- self._evict_lru()
18542
+ if self.cache is not None and isinstance(self.cache, dict):
18543
+ if len(self.cache) > self.max_size:
18544
+ self._evict_lru()
18532
18545
 
18533
- print(f'[💎] Verified answer cached: {prediction} (source={source})')
18534
-
18535
- if self.cache[key]['source'] != 'automatic_verified' and not source.startswith('automatic'):
18536
- self.pipeline.storage.save_accurate_cache_dict(self.memory_name, self.cache)
18537
-
18546
+ if self.cache is not None and isinstance(self.cache, dict):
18547
+ if self.cache[key]['source'] != 'automatic_verified' and not source.startswith('automatic'):
18548
+ self.pipeline.storage.save_accurate_cache_dict(self.memory_name, self.cache)
18549
+
18538
18550
  except Exception as e:
18539
18551
  print(f'[!] Failed to add samples and answer to Answer cache due to: {e}')
18552
+
18553
+
18540
18554
 
18541
18555
 
18542
18556
  def lookup(self, x_mlp, input_ids=None):
@@ -19718,8 +19732,8 @@ class PipelineAsyncManager:
19718
19732
  # Generate initial API key if enabled
19719
19733
  if self.config.require_api_key:
19720
19734
  self._default_api_key = api_key if api_key else self.api_key_manager.generate_key({'type': 'default'})
19721
- print(f"[🔑] Default API Key: {self._default_api_key}")
19722
- print("[!] Store this key securely - it won't be shown again!")
19735
+ print(f"[🔑] Default API Key used: {self._default_api_key}")
19736
+ print("[!] Store the key securely - it won't be shown again!")
19723
19737
 
19724
19738
  self.state_file = state_file if state_file is not None else 'security_state.json'
19725
19739
  self.admin_keys: Dict[str, dict] = {} # admin_token -> {role, created_at}
@@ -21850,7 +21864,10 @@ def train_snn_network(X=None, y=None, net=None, hidden_layer=None, utility=None,
21850
21864
 
21851
21865
  X_train, X_test, y_train, y_test, X_val, y_val = _prepare_train_val_split(X=X, y=y, random_state=random_state)
21852
21866
  y_train_net = y_train
21853
- n_classes = max(len(label_map), int(y_train.max() + 1))
21867
+ if label_map is not None:
21868
+ n_classes = max(len(label_map), int(y_train.max() + 1))
21869
+ else:
21870
+ n_classes = int(y_train.max() + 1)
21854
21871
 
21855
21872
  n_in = X_train.shape[1]
21856
21873
  if net is None or hidden_layer is None:
@@ -23658,7 +23675,10 @@ class PipelinePredictionManager:
23658
23675
  if self.pipeline.use_transformer and self.pipeline.model2 is not None:
23659
23676
  print("\n[🔄] Running Transformer forward method (Transformer)")
23660
23677
  if X is not None and y is not None:
23661
- sequence_ids = self.pipeline._features_to_sequence(X_train)
23678
+ if infer_y == 'classification':
23679
+ sequence_ids = self.pipeline._features_to_sequence(X_train)
23680
+ else:
23681
+ sequence_ids = X.copy()
23662
23682
  else:
23663
23683
  sequence_ids = self.pipeline.sequence_encoding(dataset, label_map=label_map)
23664
23684
 
@@ -26955,4 +26975,3 @@ if __name__ == "__main__":
26955
26975
  traceback.print_exc()
26956
26976
  pass
26957
26977
 
26958
-
@@ -4,14 +4,14 @@
4
4
  {
5
5
  "distutils": {
6
6
  "depends": [
7
- "/tmp/build-env-j9o13rd4/lib/python3.12/site-packages/numpy/_core/include/numpy/arrayobject.h",
8
- "/tmp/build-env-j9o13rd4/lib/python3.12/site-packages/numpy/_core/include/numpy/arrayscalars.h",
9
- "/tmp/build-env-j9o13rd4/lib/python3.12/site-packages/numpy/_core/include/numpy/ndarrayobject.h",
10
- "/tmp/build-env-j9o13rd4/lib/python3.12/site-packages/numpy/_core/include/numpy/ndarraytypes.h",
11
- "/tmp/build-env-j9o13rd4/lib/python3.12/site-packages/numpy/_core/include/numpy/ufuncobject.h"
7
+ "/tmp/build-env-o0tc6imy/lib/python3.12/site-packages/numpy/_core/include/numpy/arrayobject.h",
8
+ "/tmp/build-env-o0tc6imy/lib/python3.12/site-packages/numpy/_core/include/numpy/arrayscalars.h",
9
+ "/tmp/build-env-o0tc6imy/lib/python3.12/site-packages/numpy/_core/include/numpy/ndarrayobject.h",
10
+ "/tmp/build-env-o0tc6imy/lib/python3.12/site-packages/numpy/_core/include/numpy/ndarraytypes.h",
11
+ "/tmp/build-env-o0tc6imy/lib/python3.12/site-packages/numpy/_core/include/numpy/ufuncobject.h"
12
12
  ],
13
13
  "include_dirs": [
14
- "/tmp/build-env-j9o13rd4/lib/python3.12/site-packages/numpy/_core/include"
14
+ "/tmp/build-env-o0tc6imy/lib/python3.12/site-packages/numpy/_core/include"
15
15
  ],
16
16
  "name": "AbstractOptimizedModules",
17
17
  "sources": [
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: AbstractIntegratedModule
3
- Version: 1.3.5
3
+ Version: 1.3.6
4
4
  Summary: IntegratedPipeline Specifically provide a Framework to build Stateful continual learning Machine Learning Models optimized for Edge devices (ARM64).
5
5
  Author: Micro-Novelty
6
6
  Author-email: Micro-Novelty <hernikpuspita5@gmail.com>
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "AbstractIntegratedModule"
7
- version = "1.3.5"
7
+ version = "1.3.6"
8
8
  authors = [
9
9
  {name = "Micro-Novelty", email = "hernikpuspita5@gmail.com"},
10
10
  ]
@@ -24,7 +24,7 @@ extensions = [
24
24
 
25
25
  setup(
26
26
  name="AbstractIntegratedModule",
27
- version="1.3.5",
27
+ version="1.3.6",
28
28
  description="IntegratedPipeline Specifically provide a Framework to build Stateful continual learning Machine Learning Models optimized for Edge devices (ARM64).",
29
29
  readme="README.md",
30
30
  long_description=long_description,