---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In[14], line 17
1 cfg = {
2 "checks": checks,
3 "training_args": training_args,
(...)
13 "cluster_visualize_func": plot_all_cluster,
14 }
16 # Initialize the UpTrain framework object with config
---> 17 framework = uptrain.Framework(cfg)
18 print("Successfully Initialized UpTrain Framework")
File ~\anaconda3\lib\site-packages\uptrain\core\classes\framework.py:83, in Framework.__init__(self, cfg_dict)
81 self.model_handler = ModelHandler()
82 self.log_handler = LogHandler(framework=self, cfg=cfg)
---> 83 self.anomaly_manager = AnomalyManager(self, cfg.checks)
84 self.reset_retraining()
86 if training_args.data_transformation_func:
File ~\anaconda3\lib\site-packages\uptrain\core\classes\anomalies\managers\anomaly_manager.py:23, in AnomalyManager.__init__(self, framework, checks)
21 self.fw = framework
22 for check in checks:
---> 23 self.add_anomaly_to_monitor(check)
File ~\anaconda3\lib\site-packages\uptrain\core\classes\anomalies\managers\anomaly_manager.py:35, in AnomalyManager.add_anomaly_to_monitor(self, check)
32 elif check["type"] == Anomaly.DATA_DRIFT:
33 if "measurable_args" in check:
34 drift_managers = [
---> 35 DataDrift(
36 self.fw, check, is_embedding=check.get("is_embedding", None)
37 )
38 ]
39 else:
40 drift_managers = []
File ~\anaconda3\lib\site-packages\uptrain\core\classes\anomalies\data_drift.py:30, in DataDrift.__init__(self, fw, check, is_embedding)
28 self.count = 0
29 self.prod_dist_counts_arr = []
---> 30 self.bucket_reference_dataset()
File ~\anaconda3\lib\site-packages\uptrain\core\classes\anomalies\data_drift.py:284, in DataDrift.bucket_reference_dataset(self)
281 all_inputs = np.reshape(all_inputs, all_inputs_shape)
283 if self.is_embedding:
--> 284 self.bucket_vector(all_inputs)
285 else:
286 buckets = []
File ~\anaconda3\lib\site-packages\uptrain\core\classes\anomalies\data_drift.py:336, in DataDrift.bucket_vector(self, data)
334 def bucket_vector(self, data):
--> 336 all_clusters, counts, cluster_vars = cluster_and_plot_data(
337 data,
338 self.NUM_BUCKETS,
339 cluster_plot_func=self.cluster_plot_func,
340 plot_save_name="training_dataset_clusters.png",
341 )
343 self.clusters = np.array([all_clusters])
344 self.cluster_vars = np.array([cluster_vars])
File ~\anaconda3\lib\site-packages\uptrain\core\lib\helper_funcs.py:16, in cluster_and_plot_data(data, num_clusters, cluster_plot_func, plot_save_name)
12 def cluster_and_plot_data(
13 data, num_clusters, cluster_plot_func=None, plot_save_name=""
14 ):
15 kmeans = KMeans(n_clusters=num_clusters, random_state=1, n_init=10)
---> 16 kmeans.fit(data)
17 all_clusters = kmeans.cluster_centers_
18 all_labels = kmeans.labels_
File ~\anaconda3\lib\site-packages\sklearn\cluster\_kmeans.py:1455, in KMeans.fit(self, X, y, sample_weight)
1453 else:
1454 kmeans_single = _kmeans_single_lloyd
-> 1455 self._check_mkl_vcomp(X, X.shape[0])
1457 best_inertia, best_labels = None, None
1459 for i in range(self._n_init):
1460 # Initialize centers
File ~\anaconda3\lib\site-packages\sklearn\cluster\_kmeans.py:911, in _BaseKMeans._check_mkl_vcomp(self, X, n_samples)
909 n_active_threads = int(np.ceil(n_samples / CHUNK_SIZE))
910 if n_active_threads < self._n_threads:
--> 911 modules = threadpool_info()
912 has_vcomp = "vcomp" in [module["prefix"] for module in modules]
913 has_mkl = ("mkl", "intel") in [
914 (module["internal_api"], module.get("threading_layer", None))
915 for module in modules
916 ]
File ~\anaconda3\lib\site-packages\sklearn\utils\fixes.py:150, in threadpool_info()
148 return controller.info()
149 else:
--> 150 return threadpoolctl.threadpool_info()
File ~\anaconda3\lib\site-packages\threadpoolctl.py:124, in threadpool_info()
107 @_format_docstring(USER_APIS=list(_ALL_USER_APIS),
108 INTERNAL_APIS=_ALL_INTERNAL_APIS)
109 def threadpool_info():
110 """Return the maximal number of threads for each detected library.
111
112 Return a list with all the supported modules that have been found. Each
(...)
122 In addition, each module may contain internal_api specific entries.
123 """
--> 124 return _ThreadpoolInfo(user_api=_ALL_USER_APIS).todicts()
File ~\anaconda3\lib\site-packages\threadpoolctl.py:340, in _ThreadpoolInfo.__init__(self, user_api, prefixes, modules)
337 self.user_api = [] if user_api is None else user_api
339 self.modules = []
--> 340 self._load_modules()
341 self._warn_if_incompatible_openmp()
342 else:
File ~\anaconda3\lib\site-packages\threadpoolctl.py:373, in _ThreadpoolInfo._load_modules(self)
371 self._find_modules_with_dyld()
372 elif sys.platform == "win32":
--> 373 self._find_modules_with_enum_process_module_ex()
374 else:
375 self._find_modules_with_dl_iterate_phdr()
File ~\anaconda3\lib\site-packages\threadpoolctl.py:485, in _ThreadpoolInfo._find_modules_with_enum_process_module_ex(self)
482 filepath = buf.value
484 # Store the module if it is supported and selected
--> 485 self._make_module_from_path(filepath)
486 finally:
487 kernel_32.CloseHandle(h_process)
File ~\anaconda3\lib\site-packages\threadpoolctl.py:515, in _ThreadpoolInfo._make_module_from_path(self, filepath)
513 if prefix in self.prefixes or user_api in self.user_api:
514 module_class = globals()[module_class]
--> 515 module = module_class(filepath, prefix, user_api, internal_api)
516 self.modules.append(module)
File ~\anaconda3\lib\site-packages\threadpoolctl.py:606, in _Module.__init__(self, filepath, prefix, user_api, internal_api)
604 self.internal_api = internal_api
605 self._dynlib = ctypes.CDLL(filepath, mode=_RTLD_NOLOAD)
--> 606 self.version = self.get_version()
607 self.num_threads = self.get_num_threads()
608 self._get_extra_info()
File ~\anaconda3\lib\site-packages\threadpoolctl.py:646, in _OpenBLASModule.get_version(self)
643 get_config = getattr(self._dynlib, "openblas_get_config",
644 lambda: None)
645 get_config.restype = ctypes.c_char_p
--> 646 config = get_config().split()
647 if config[0] == b"OpenBLAS":
648 return config[1].decode("utf-8")
AttributeError: 'NoneType' object has no attribute 'split'