ddi-fw 0.0.154__py3-none-any.whl → 0.0.157__py3-none-any.whl
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.
- ddi_fw/datasets/ddi_mdl/base.py +5 -0
- ddi_fw/datasets/feature_vector_generation.py +1 -1
- ddi_fw/pipeline/multi_pipeline.py +2 -0
- ddi_fw-0.0.157.dist-info/METADATA +76 -0
- {ddi_fw-0.0.154.dist-info → ddi_fw-0.0.157.dist-info}/RECORD +7 -7
- {ddi_fw-0.0.154.dist-info → ddi_fw-0.0.157.dist-info}/WHEEL +1 -1
- ddi_fw-0.0.154.dist-info/METADATA +0 -54
- {ddi_fw-0.0.154.dist-info → ddi_fw-0.0.157.dist-info}/top_level.txt +0 -0
ddi_fw/datasets/ddi_mdl/base.py
CHANGED
@@ -15,6 +15,9 @@ from abc import ABC, abstractmethod
|
|
15
15
|
from sklearn.preprocessing import LabelBinarizer
|
16
16
|
|
17
17
|
from sklearn.model_selection import KFold, StratifiedKFold, train_test_split
|
18
|
+
import logging
|
19
|
+
|
20
|
+
logger = logging.getLogger(__name__)
|
18
21
|
|
19
22
|
# Constants for embedding, chemical properties, and NER columns
|
20
23
|
LIST_OF_EMBEDDING_COLUMNS = [
|
@@ -57,6 +60,7 @@ class DDIMDLDataset(TextDatasetMixin):
|
|
57
60
|
return values
|
58
61
|
|
59
62
|
def __init__(self, **kwargs):
|
63
|
+
|
60
64
|
super().__init__(**kwargs)
|
61
65
|
self.class_column = 'event_category'
|
62
66
|
_db_path = HERE.joinpath('data/event.db')
|
@@ -67,6 +71,7 @@ class DDIMDLDataset(TextDatasetMixin):
|
|
67
71
|
# TODO with resource
|
68
72
|
self._conn = create_connection(_db_path.absolute().as_posix())
|
69
73
|
self.load_drugs_and_events()
|
74
|
+
logger.info(f'{self.dataset_name} is initialized')
|
70
75
|
|
71
76
|
def load_drugs_and_events(self):
|
72
77
|
self.drugs_df = self.__select_all_drugs_as_dataframe__()
|
@@ -35,7 +35,7 @@ class SimilarityMatrixGenerator:
|
|
35
35
|
return jaccard_sim_matrix
|
36
36
|
|
37
37
|
# https://github.com/YifanDengWHU/DDIMDL/blob/master/DDIMDL.py , def Jaccard(matrix):
|
38
|
-
def create_jaccard_similarity_matrices(self, matrix):
|
38
|
+
def create_jaccard_similarity_matrices(self, matrix)->np.ndarray:
|
39
39
|
matrix = np.mat(matrix)
|
40
40
|
numerator = matrix * matrix.T
|
41
41
|
denominator = np.ones(np.shape(matrix)) * matrix.T + \
|
@@ -68,6 +68,7 @@ class MultiPipeline():
|
|
68
68
|
# Dynamically import the model and dataset classes
|
69
69
|
# model_type = get_import(config.get("model_type"))
|
70
70
|
dataset_type = get_import(config.get("dataset_type"))
|
71
|
+
dataset_splitter_type = get_import(config.get("dataset_splitter_type"))
|
71
72
|
|
72
73
|
combination_type = None
|
73
74
|
kwargs_combination_params=None
|
@@ -89,6 +90,7 @@ class MultiPipeline():
|
|
89
90
|
artifact_location=artifact_location,
|
90
91
|
tracking_uri=tracking_uri,
|
91
92
|
dataset_type=dataset_type,
|
93
|
+
dataset_splitter_type=dataset_splitter_type,
|
92
94
|
columns=columns,
|
93
95
|
column_embedding_configs=column_embedding_configs,
|
94
96
|
vector_db_persist_directory=vector_db_persist_directory,
|
@@ -0,0 +1,76 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: ddi_fw
|
3
|
+
Version: 0.0.157
|
4
|
+
Summary: Do not use :)
|
5
|
+
Author-email: Kıvanç Bayraktar <bayraktarkivanc@gmail.com>
|
6
|
+
Maintainer-email: Kıvanç Bayraktar <bayraktarkivanc@gmail.com>
|
7
|
+
Keywords: Machine Learning
|
8
|
+
Classifier: Development Status :: 1 - Planning
|
9
|
+
Classifier: Environment :: Console
|
10
|
+
Classifier: Intended Audience :: Science/Research
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
12
|
+
Classifier: Operating System :: OS Independent
|
13
|
+
Classifier: Framework :: Pytest
|
14
|
+
Classifier: Framework :: tox
|
15
|
+
Classifier: Framework :: Sphinx
|
16
|
+
Classifier: Programming Language :: Python
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
18
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
19
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
20
|
+
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
21
|
+
Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
22
|
+
Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
|
23
|
+
Requires-Python: >=3.10
|
24
|
+
Description-Content-Type: text/markdown
|
25
|
+
Requires-Dist: tqdm>=4.66.6
|
26
|
+
Requires-Dist: pandas>=2.2.0
|
27
|
+
Provides-Extra: llm
|
28
|
+
Requires-Dist: sentence-transformers<=3.3.1,>=3.0.1; extra == "llm"
|
29
|
+
Requires-Dist: transformers>=4.42.4; extra == "llm"
|
30
|
+
Requires-Dist: stanza==1.9.2; extra == "llm"
|
31
|
+
Requires-Dist: tokenizers>=0.19.1; extra == "llm"
|
32
|
+
Requires-Dist: openai>=1.52.2; extra == "llm"
|
33
|
+
Requires-Dist: langchain>=0.3.4; extra == "llm"
|
34
|
+
Requires-Dist: langchain_community==0.3.3; extra == "llm"
|
35
|
+
Provides-Extra: ml
|
36
|
+
Requires-Dist: scikit-learn==1.5.2; extra == "ml"
|
37
|
+
Requires-Dist: tensorflow<2.18.0,>=2.17.0; extra == "ml"
|
38
|
+
Requires-Dist: tf-keras==2.17.0; extra == "ml"
|
39
|
+
Requires-Dist: mlflow==2.16.1; extra == "ml"
|
40
|
+
Requires-Dist: accelerate>=0.33.0; extra == "ml"
|
41
|
+
Requires-Dist: numpy>=1.26.4; extra == "ml"
|
42
|
+
Requires-Dist: scipy==1.13.1; extra == "ml"
|
43
|
+
Requires-Dist: pandas>=2.2.0; extra == "ml"
|
44
|
+
Requires-Dist: plotly==5.24.1; extra == "ml"
|
45
|
+
Requires-Dist: matplotlib==3.8.0; extra == "ml"
|
46
|
+
Requires-Dist: rdkit==2023.3.3; extra == "ml"
|
47
|
+
Requires-Dist: datasets==3.0.2; extra == "ml"
|
48
|
+
Requires-Dist: tqdm>=4.66.6; extra == "ml"
|
49
|
+
Provides-Extra: datasets
|
50
|
+
Requires-Dist: datasets==3.0.2; extra == "datasets"
|
51
|
+
Requires-Dist: unstructured==0.16.3; extra == "datasets"
|
52
|
+
Requires-Dist: py7zr==0.22.0; extra == "datasets"
|
53
|
+
Requires-Dist: xmlschema==3.4.2; extra == "datasets"
|
54
|
+
Provides-Extra: drugbank
|
55
|
+
Requires-Dist: rdkit==2023.3.3; extra == "drugbank"
|
56
|
+
Requires-Dist: openai>=1.52.2; extra == "drugbank"
|
57
|
+
Provides-Extra: pipeline-and-ner
|
58
|
+
Requires-Dist: nltk>=3.8.1; extra == "pipeline-and-ner"
|
59
|
+
Requires-Dist: stanza==1.9.2; extra == "pipeline-and-ner"
|
60
|
+
Requires-Dist: transformers>=4.42.4; extra == "pipeline-and-ner"
|
61
|
+
Requires-Dist: sentence-transformers<=3.3.1,>=3.0.1; extra == "pipeline-and-ner"
|
62
|
+
Requires-Dist: mlflow==2.16.1; extra == "pipeline-and-ner"
|
63
|
+
Provides-Extra: utils
|
64
|
+
Requires-Dist: pydantic==2.10.6; extra == "utils"
|
65
|
+
Requires-Dist: python-stopwatch==1.1.11; extra == "utils"
|
66
|
+
Requires-Dist: importlib-resources==6.4.5; extra == "utils"
|
67
|
+
Requires-Dist: lxml==5.3.0; extra == "utils"
|
68
|
+
Requires-Dist: pyarrow==17.0.0; extra == "utils"
|
69
|
+
Requires-Dist: pycryptodomex==3.22.0; extra == "utils"
|
70
|
+
Requires-Dist: pydantic-settings-2.8.1; extra == "utils"
|
71
|
+
Requires-Dist: python-dotenv-1.1.0; extra == "utils"
|
72
|
+
Requires-Dist: python-iso639-2025.2.18; extra == "utils"
|
73
|
+
Requires-Dist: python-magic-0.4.27; extra == "utils"
|
74
|
+
Requires-Dist: pyzstd==0.16.2; extra == "utils"
|
75
|
+
Requires-Dist: databricks-sdk-0.47.0; extra == "utils"
|
76
|
+
Requires-Dist: python-tml-1.0.2; extra == "utils"
|
@@ -3,10 +3,10 @@ ddi_fw/datasets/core.py,sha256=vRMpUsIHIbOKi-6TuUPNu1Ve3ny3cS9hdsydQxFCNvE,8078
|
|
3
3
|
ddi_fw/datasets/dataset_splitter.py,sha256=8H8uZTAf8N9LUZeSeHOMawtJFJhnDgUUqFcnl7dquBQ,1672
|
4
4
|
ddi_fw/datasets/db_utils.py,sha256=OTsa3d-Iic7z3HmzSQK9UigedRbHDxYChJk0s4GfLnw,6191
|
5
5
|
ddi_fw/datasets/embedding_generator.py,sha256=jiDKwLaPMaQkloxQkuCrhl-A-2OdvocmkSzjWtUnk4g,2255
|
6
|
-
ddi_fw/datasets/feature_vector_generation.py,sha256=
|
6
|
+
ddi_fw/datasets/feature_vector_generation.py,sha256=Z1A_DOBqDFPqLN4YB-3oYlOQWJK-X6Oes6UFjpzR47Q,4760
|
7
7
|
ddi_fw/datasets/idf_helper.py,sha256=_Gd1dtDSLaw8o-o0JugzSKMt9FpeXewTh4wGEaUd4VQ,2571
|
8
8
|
ddi_fw/datasets/setup_._py,sha256=khYVJuW5PlOY_i_A16F3UbSZ6s6o_ljw33Byw3C-A8E,1047
|
9
|
-
ddi_fw/datasets/ddi_mdl/base.py,sha256=
|
9
|
+
ddi_fw/datasets/ddi_mdl/base.py,sha256=yLxNzDYjLekq1qE6mKh6WkzUU5Xvn3JBEET9Ed-7b_E,9471
|
10
10
|
ddi_fw/datasets/ddi_mdl/debug.log,sha256=eWz05j8RFqZuHFDTCF7Rck5w4rvtTanFN21iZsgxO7Y,115
|
11
11
|
ddi_fw/datasets/ddi_mdl/readme.md,sha256=WC6lpmsEKvIISnZqENY7TWtzCQr98HPpE3oRsBl8pIw,625
|
12
12
|
ddi_fw/datasets/ddi_mdl/data/event.db,sha256=cmlSsf9MYjRzqR-mw3cUDnTnfT6FkpOG2yCl2mMwwew,30580736
|
@@ -86,7 +86,7 @@ ddi_fw/ner/mmlrestclient.py,sha256=NZta7m2Qm6I_qtVguMZhqtAUjVBmmXn0-TMnsNp0jpg,6
|
|
86
86
|
ddi_fw/ner/ner.py,sha256=FHyyX53Xwpdw8Hec261dyN88yD7Z9LmJua2mIrQLguI,17967
|
87
87
|
ddi_fw/pipeline/__init__.py,sha256=tKDM_rW4vPjlYTeOkNgi9PujDzb4e9O3LK1w5wqnebw,212
|
88
88
|
ddi_fw/pipeline/multi_modal_combination_strategy.py,sha256=JSyuP71b1I1yuk0s2ecCJZTtCED85jBtkpwTUxibJvI,1706
|
89
|
-
ddi_fw/pipeline/multi_pipeline.py,sha256=
|
89
|
+
ddi_fw/pipeline/multi_pipeline.py,sha256=NfcH4Ze5U-JRiH3lrxEDWj-VPxYQYtp7tq6bLCImBzs,5550
|
90
90
|
ddi_fw/pipeline/ner_pipeline.py,sha256=q1aKjb54Ra1HzZ7dARvBw6lB37je9R-POEf2h6QT_nU,6018
|
91
91
|
ddi_fw/pipeline/pipeline.py,sha256=70lYsluAnTWDLTlf6rbecffw3Bl34L1_6ALfLUoSvtY,11324
|
92
92
|
ddi_fw/utils/__init__.py,sha256=77563ikqAtdzjjgRlLp5OAsJBbpLA1Cao8iecGaVUXQ,354
|
@@ -97,7 +97,7 @@ ddi_fw/utils/package_helper.py,sha256=erl8_onmhK-41zQoaED2qyDUV9GQxmT9sdoyRp9_q5
|
|
97
97
|
ddi_fw/utils/py7zr_helper.py,sha256=gOqaFIyJvTjUM-btO2x9AQ69jZOS8PoKN0wetYIckJw,4747
|
98
98
|
ddi_fw/utils/utils.py,sha256=szwnxMTDRrZoeNRyDuf3aCbtzriwtaRk4mHSH3asLdA,4301
|
99
99
|
ddi_fw/utils/zip_helper.py,sha256=YRZA4tKZVBJwGQM0_WK6L-y5MoqkKoC-nXuuHK6CU9I,5567
|
100
|
-
ddi_fw-0.0.
|
101
|
-
ddi_fw-0.0.
|
102
|
-
ddi_fw-0.0.
|
103
|
-
ddi_fw-0.0.
|
100
|
+
ddi_fw-0.0.157.dist-info/METADATA,sha256=BDNkvrnqN1gxAqUjpmyUqE-YGz86JZpVF0NM_q-oEJk,3612
|
101
|
+
ddi_fw-0.0.157.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
102
|
+
ddi_fw-0.0.157.dist-info/top_level.txt,sha256=PMwHICFZTZtcpzQNPV4UQnfNXYIeLR_Ste-Wfc1h810,7
|
103
|
+
ddi_fw-0.0.157.dist-info/RECORD,,
|
@@ -1,54 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.4
|
2
|
-
Name: ddi_fw
|
3
|
-
Version: 0.0.154
|
4
|
-
Summary: Do not use :)
|
5
|
-
Author-email: Kıvanç Bayraktar <bayraktarkivanc@gmail.com>
|
6
|
-
Maintainer-email: Kıvanç Bayraktar <bayraktarkivanc@gmail.com>
|
7
|
-
Keywords: Machine Learning
|
8
|
-
Classifier: Development Status :: 1 - Planning
|
9
|
-
Classifier: Environment :: Console
|
10
|
-
Classifier: Intended Audience :: Science/Research
|
11
|
-
Classifier: License :: OSI Approved :: MIT License
|
12
|
-
Classifier: Operating System :: OS Independent
|
13
|
-
Classifier: Framework :: Pytest
|
14
|
-
Classifier: Framework :: tox
|
15
|
-
Classifier: Framework :: Sphinx
|
16
|
-
Classifier: Programming Language :: Python
|
17
|
-
Classifier: Programming Language :: Python :: 3.8
|
18
|
-
Classifier: Programming Language :: Python :: 3 :: Only
|
19
|
-
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
20
|
-
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
21
|
-
Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
22
|
-
Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
|
23
|
-
Requires-Python: >=3.10
|
24
|
-
Description-Content-Type: text/markdown
|
25
|
-
Requires-Dist: pydantic==2.10.6
|
26
|
-
Requires-Dist: importlib-resources==6.4.5
|
27
|
-
Requires-Dist: python-stopwatch==1.1.11
|
28
|
-
Requires-Dist: lxml==5.3.0
|
29
|
-
Requires-Dist: matplotlib==3.8.0
|
30
|
-
Requires-Dist: mlflow==2.16.1
|
31
|
-
Requires-Dist: nltk>=3.8.1
|
32
|
-
Requires-Dist: numpy>=1.26.4
|
33
|
-
Requires-Dist: pandas>=2.2.0
|
34
|
-
Requires-Dist: plotly==5.24.1
|
35
|
-
Requires-Dist: rdkit==2023.3.3
|
36
|
-
Requires-Dist: scikit-learn==1.5.2
|
37
|
-
Requires-Dist: scipy==1.13.1
|
38
|
-
Requires-Dist: accelerate>=0.33.0
|
39
|
-
Requires-Dist: sentence-transformers<=3.3.1,>=3.0.1
|
40
|
-
Requires-Dist: transformers>=4.42.4
|
41
|
-
Requires-Dist: stanza==1.9.2
|
42
|
-
Requires-Dist: tokenizers>=0.19.1
|
43
|
-
Requires-Dist: tqdm>=4.66.6
|
44
|
-
Requires-Dist: xmlschema==3.4.2
|
45
|
-
Requires-Dist: zipp>=3.20.2
|
46
|
-
Requires-Dist: py7zr==0.22.0
|
47
|
-
Requires-Dist: openai>=1.52.2
|
48
|
-
Requires-Dist: langchain>=0.3.4
|
49
|
-
Requires-Dist: chromadb>=0.5.15
|
50
|
-
Requires-Dist: langchain_community==0.3.3
|
51
|
-
Requires-Dist: datasets==3.0.2
|
52
|
-
Requires-Dist: unstructured==0.16.3
|
53
|
-
Requires-Dist: tensorflow<2.18.0,>=2.17.0
|
54
|
-
Requires-Dist: tf-keras==2.17.0
|
File without changes
|