aiagents4pharma 1.47.0__py3-none-any.whl → 1.48.0__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.
@@ -58,6 +58,7 @@ LABEL description="AI Agents for Pharma - Streamlit Application"
58
58
  RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
59
59
  ca-certificates \
60
60
  curl \
61
+ gnupg \
61
62
  libmagic1 \
62
63
  libopenblas0 \
63
64
  libomp5 \
@@ -66,6 +67,23 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins
66
67
  && update-alternatives --install /usr/bin/python3 python3 /usr/bin/python${PYTHON_VERSION} 1 \
67
68
  && update-alternatives --install /usr/bin/python python /usr/bin/python${PYTHON_VERSION} 1
68
69
 
70
+ # Install CUDA runtime libraries required by cudf/cupy
71
+ RUN curl -fsSL https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/3bf863cc.pub \
72
+ | gpg --dearmor -o /usr/share/keyrings/nvidia-cuda-keyring.gpg \
73
+ && echo "deb [signed-by=/usr/share/keyrings/nvidia-cuda-keyring.gpg] https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/ /" \
74
+ > /etc/apt/sources.list.d/nvidia-cuda.list \
75
+ && apt-get update \
76
+ && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
77
+ cuda-cudart-12-6 \
78
+ cuda-cudart-dev-12-6 \
79
+ cuda-nvrtc-12-6 \
80
+ cuda-nvrtc-dev-12-6 \
81
+ libcublas-12-6 \
82
+ libcusparse-12-6 \
83
+ && rm -rf /var/lib/apt/lists/*
84
+
85
+ ENV LD_LIBRARY_PATH=/usr/local/cuda/lib64
86
+
69
87
  # Copy UV virtual environment from build stage
70
88
  COPY --from=uv-install /opt/venv /opt/venv
71
89
 
@@ -15,7 +15,7 @@ MILVUS_HOST=localhost
15
15
  MILVUS_PORT=19530
16
16
  MILVUS_USER=root
17
17
  MILVUS_PASSWORD=Milvus
18
- MILVUS_DATABASE=your_database_name_here
18
+ MILVUS_DATABASE=t2kg_primekg
19
19
 
20
20
  # Specify the data directory for multimodal data to your own data directory
21
21
  # DATA_DIR=/your_absolute_path_to_your_data_dir/
@@ -15,7 +15,7 @@ MILVUS_HOST=localhost
15
15
  MILVUS_PORT=19530
16
16
  MILVUS_USER=root
17
17
  MILVUS_PASSWORD=Milvus
18
- MILVUS_DATABASE=your_database_name_here
18
+ MILVUS_DATABASE=t2kg_primekg
19
19
 
20
20
  # Specify the data directory for multimodal data to your own data directory
21
21
  # DATA_DIR=/your_absolute_path_to_your_data_dir/
@@ -58,6 +58,7 @@ LABEL description="AI Agents for Pharma - Knowledge Graphs Application"
58
58
  RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
59
59
  ca-certificates \
60
60
  curl \
61
+ gnupg \
61
62
  libmagic1 \
62
63
  libopenblas0 \
63
64
  libomp5 \
@@ -66,6 +67,23 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins
66
67
  && update-alternatives --install /usr/bin/python3 python3 /usr/bin/python${PYTHON_VERSION} 1 \
67
68
  && update-alternatives --install /usr/bin/python python /usr/bin/python${PYTHON_VERSION} 1
68
69
 
70
+ # Install CUDA runtime libraries required by cudf/cupy
71
+ RUN curl -fsSL https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/3bf863cc.pub \
72
+ | gpg --dearmor -o /usr/share/keyrings/nvidia-cuda-keyring.gpg \
73
+ && echo "deb [signed-by=/usr/share/keyrings/nvidia-cuda-keyring.gpg] https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/ /" \
74
+ > /etc/apt/sources.list.d/nvidia-cuda.list \
75
+ && apt-get update \
76
+ && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
77
+ cuda-cudart-12-6 \
78
+ cuda-cudart-dev-12-6 \
79
+ cuda-nvrtc-12-6 \
80
+ cuda-nvrtc-dev-12-6 \
81
+ libcublas-12-6 \
82
+ libcusparse-12-6 \
83
+ && rm -rf /var/lib/apt/lists/*
84
+
85
+ ENV LD_LIBRARY_PATH=/usr/local/cuda/lib64
86
+
69
87
  # Copy UV virtual environment from build stage
70
88
  COPY --from=uv-install /opt/venv /opt/venv
71
89
 
@@ -15,7 +15,7 @@ MILVUS_HOST=localhost
15
15
  MILVUS_PORT=19530
16
16
  MILVUS_USER=root
17
17
  MILVUS_PASSWORD=Milvus
18
- MILVUS_DATABASE=your_database_name_here
18
+ MILVUS_DATABASE=t2kg_primekg
19
19
 
20
20
  # Specify the data directory for multimodal data to your own data directory
21
21
  # DATA_DIR=/your_absolute_path_to_your_data_dir/
@@ -15,7 +15,7 @@ MILVUS_HOST=localhost
15
15
  MILVUS_PORT=19530
16
16
  MILVUS_USER=root
17
17
  MILVUS_PASSWORD=Milvus
18
- MILVUS_DATABASE=your_database_name_here
18
+ MILVUS_DATABASE=t2kg_primekg
19
19
 
20
20
  # Specify the data directory for multimodal data to your own data directory
21
21
  # DATA_DIR=/your_absolute_path_to_your_data_dir/
@@ -150,6 +150,7 @@ class DynamicDataLoader:
150
150
  self.normalize_vectors = self.use_gpu # Only normalize for GPU (original logic)
151
151
  self.vector_index_type = "GPU_CAGRA" if self.use_gpu else "HNSW"
152
152
  self.metric_type = "IP" if self.use_gpu else "COSINE"
153
+ self.vector_index_params = self._build_vector_index_params()
153
154
 
154
155
  logger.info("Loader Configuration:")
155
156
  logger.info(" Using GPU acceleration: %s", self.use_gpu)
@@ -284,6 +285,29 @@ class DynamicDataLoader:
284
285
  else:
285
286
  return list(data)
286
287
 
288
+ def _build_vector_index_params(self) -> dict[str, Any]:
289
+ """Return index params tuned for the selected backend."""
290
+ base_params: dict[str, Any] = {
291
+ "index_type": self.vector_index_type,
292
+ "metric_type": self.metric_type,
293
+ }
294
+
295
+ if self.vector_index_type == "GPU_CAGRA":
296
+ base_params["params"] = {
297
+ "graph_degree": int(os.getenv("CAGRA_GRAPH_DEGREE", "32")),
298
+ "intermediate_graph_degree": int(
299
+ os.getenv("CAGRA_INTERMEDIATE_GRAPH_DEGREE", "40")
300
+ ),
301
+ "search_width": int(os.getenv("CAGRA_SEARCH_WIDTH", "64")),
302
+ }
303
+ elif self.vector_index_type == "HNSW":
304
+ base_params["params"] = {
305
+ "M": int(os.getenv("HNSW_M", "16")),
306
+ "efConstruction": int(os.getenv("HNSW_EF_CONSTRUCTION", "200")),
307
+ }
308
+
309
+ return base_params
310
+
287
311
  def connect_to_milvus(self):
288
312
  """Connect to Milvus and setup database."""
289
313
  logger.info("Connecting to Milvus at %s:%s", self.milvus_host, self.milvus_port)
@@ -442,10 +466,7 @@ class DynamicDataLoader:
442
466
  )
443
467
  collection.create_index(
444
468
  field_name="desc_emb",
445
- index_params={
446
- "index_type": self.vector_index_type,
447
- "metric_type": self.metric_type,
448
- },
469
+ index_params=self.vector_index_params.copy(),
449
470
  index_name="desc_emb_index",
450
471
  )
451
472
 
@@ -569,18 +590,12 @@ class DynamicDataLoader:
569
590
  )
570
591
  collection.create_index(
571
592
  field_name="desc_emb",
572
- index_params={
573
- "index_type": self.vector_index_type,
574
- "metric_type": self.metric_type,
575
- },
593
+ index_params=self.vector_index_params.copy(),
576
594
  index_name="desc_emb_index",
577
595
  )
578
596
  collection.create_index(
579
597
  field_name="feat_emb",
580
- index_params={
581
- "index_type": self.vector_index_type,
582
- "metric_type": self.metric_type,
583
- },
598
+ index_params=self.vector_index_params.copy(),
584
599
  index_name="feat_emb_index",
585
600
  )
586
601
 
@@ -706,10 +721,7 @@ class DynamicDataLoader:
706
721
  )
707
722
  collection.create_index(
708
723
  field_name="feat_emb",
709
- index_params={
710
- "index_type": self.vector_index_type,
711
- "metric_type": self.metric_type,
712
- },
724
+ index_params=self.vector_index_params.copy(),
713
725
  index_name="feat_emb_index",
714
726
  )
715
727
 
@@ -796,8 +808,7 @@ class DynamicDataLoader:
796
808
  logger.info(" %s: %d entities", coll, collection.num_entities)
797
809
 
798
810
  except Exception:
799
- logger.error("Error occurred during data loading")
800
- logger.debug("Detailed error information available in debug mode")
811
+ logger.exception("Error occurred during data loading")
801
812
  raise
802
813
 
803
814
 
@@ -867,8 +878,7 @@ def main():
867
878
  logger.info("Data loading interrupted by user")
868
879
  sys.exit(1)
869
880
  except Exception:
870
- logger.error("Fatal error occurred during data loading")
871
- logger.debug("Detailed error information available in debug mode")
881
+ logger.exception("Fatal error occurred during data loading")
872
882
  sys.exit(1)
873
883
 
874
884
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aiagents4pharma
3
- Version: 1.47.0
3
+ Version: 1.48.0
4
4
  Summary: AI Agents for drug discovery, drug development, and other pharmaceutical R&D.
5
5
  License-File: LICENSE
6
6
  Classifier: License :: OSI Approved :: MIT License
@@ -1,6 +1,6 @@
1
1
  aiagents4pharma/__init__.py,sha256=B-tLRCbWgti-jlCnW_qknNKrG4j1t9nhBb-gXaz0Wtg,187
2
2
  aiagents4pharma/talk2aiagents4pharma/.dockerignore,sha256=-hAM7RzkGbjDeU411-kXOmYzNfl3Z9OlLWvN9zMDAXE,89
3
- aiagents4pharma/talk2aiagents4pharma/Dockerfile,sha256=J2QvwifcCxtz9EzPaq99zhSygHV9ADsB5ZQ_cmiwATI,3533
3
+ aiagents4pharma/talk2aiagents4pharma/Dockerfile,sha256=DScrZujkLc5OY79XP5KSAfxiniQlZ5MWHkbtw534JY4,4295
4
4
  aiagents4pharma/talk2aiagents4pharma/README.md,sha256=0eGxj7jxi_LrCvX-4I4KrQv-7T2ivo3pqLslG7suaCk,74
5
5
  aiagents4pharma/talk2aiagents4pharma/__init__.py,sha256=gjVTAhBHKPEFBbv_2T-MWuDdwHhAKfWIo-lQSrcsLNE,97
6
6
  aiagents4pharma/talk2aiagents4pharma/install.md,sha256=5oyy9P8fd03x3f_jOFZTGg2G1AzxMIOrH2vVd8ZS4Iw,4201
@@ -13,9 +13,9 @@ aiagents4pharma/talk2aiagents4pharma/configs/agents/main_agent/default.yaml,sha2
13
13
  aiagents4pharma/talk2aiagents4pharma/configs/app/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
14
  aiagents4pharma/talk2aiagents4pharma/configs/app/frontend/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
15
  aiagents4pharma/talk2aiagents4pharma/configs/app/frontend/default.yaml,sha256=BpDv_Bau0F7xDPzMHVYxedKpZQAPdo0rAsRnfH32-U8,3470
16
- aiagents4pharma/talk2aiagents4pharma/docker-compose/cpu/.env.example,sha256=twsuiEN-FczXfka40_bVoSQXaMDR_3J3ESKCqU4qSkg,585
16
+ aiagents4pharma/talk2aiagents4pharma/docker-compose/cpu/.env.example,sha256=mfwCKG0bv6_IjEfIdQlEb6cnXsbaeAqC_U4kcIa03o0,574
17
17
  aiagents4pharma/talk2aiagents4pharma/docker-compose/cpu/docker-compose.yml,sha256=2I8jyzaFXSGsBMMFOZ4Hz7hAH3A-ELpoYCphkpT_8rA,2631
18
- aiagents4pharma/talk2aiagents4pharma/docker-compose/gpu/.env.example,sha256=twsuiEN-FczXfka40_bVoSQXaMDR_3J3ESKCqU4qSkg,585
18
+ aiagents4pharma/talk2aiagents4pharma/docker-compose/gpu/.env.example,sha256=mfwCKG0bv6_IjEfIdQlEb6cnXsbaeAqC_U4kcIa03o0,574
19
19
  aiagents4pharma/talk2aiagents4pharma/docker-compose/gpu/docker-compose.yml,sha256=bZwpaLynxyY6YOj2Sdz3MEVKgBY-FFXTC_K_KmZrMuM,3001
20
20
  aiagents4pharma/talk2aiagents4pharma/states/__init__.py,sha256=VuVAFmoH8p2erE-mYiaa0uoqTuFynBcXia5Y8lmjI34,109
21
21
  aiagents4pharma/talk2aiagents4pharma/states/state_talk2aiagents4pharma.py,sha256=ahquXi8hg6Bk1ttskl9QaYdHq4rDWa_bK7hu81E75M4,468
@@ -94,12 +94,12 @@ aiagents4pharma/talk2cells/tools/scp_agent/__init__.py,sha256=DAJp26kugSdVHfFyVR
94
94
  aiagents4pharma/talk2cells/tools/scp_agent/display_studies.py,sha256=nQltO147j1cFWUJ9mxg3JlWBLsqFivhJ93g1G7gWZko,602
95
95
  aiagents4pharma/talk2cells/tools/scp_agent/search_studies.py,sha256=xjsgYJ8Bn8RIzIu_bgn8D_2I8wzLOJeu9evT_vF15mM,2647
96
96
  aiagents4pharma/talk2knowledgegraphs/.dockerignore,sha256=-hAM7RzkGbjDeU411-kXOmYzNfl3Z9OlLWvN9zMDAXE,89
97
- aiagents4pharma/talk2knowledgegraphs/Dockerfile,sha256=qGy6I4oBvQonpDEANQaCW-5JMtHPdd2HKc-JJgoCyYQ,3384
97
+ aiagents4pharma/talk2knowledgegraphs/Dockerfile,sha256=0Do2gcsbEeh07xnPNuApTV77bfEbhAYSdMEwE3U0CKU,4130
98
98
  aiagents4pharma/talk2knowledgegraphs/README.md,sha256=0eGxj7jxi_LrCvX-4I4KrQv-7T2ivo3pqLslG7suaCk,74
99
99
  aiagents4pharma/talk2knowledgegraphs/__init__.py,sha256=ZztaRzRlovSXtVX3i9Rvf84ivIjPn8RMPiYRkbkEJ0E,114
100
100
  aiagents4pharma/talk2knowledgegraphs/entrypoint.sh,sha256=EK_jGau1VuW1uTmFWZcKhLMK9VanC5l3q9axF4ZYgmI,5758
101
101
  aiagents4pharma/talk2knowledgegraphs/install.md,sha256=1rCv2e6ywb-kZOxtqFJ25qpWHl2MCa9bW6nHYHfxJMI,5555
102
- aiagents4pharma/talk2knowledgegraphs/milvus_data_dump.py,sha256=D5BB700QshEhY6paByXNLyMjOYyO4Csm4ODgbeeWfmc,35616
102
+ aiagents4pharma/talk2knowledgegraphs/milvus_data_dump.py,sha256=RyPYjtF49DxL7MIWmVUprw0Wpu4HErHOAOQ2_wLUfVI,36095
103
103
  aiagents4pharma/talk2knowledgegraphs/agents/__init__.py,sha256=ugUvVYEdjbZ3y_dogfF5hpQ3lFPFrAvLSydlcpbkGo0,93
104
104
  aiagents4pharma/talk2knowledgegraphs/agents/t2kg_agent.py,sha256=GDeSjJNhAqQWagZOxAWUKqDhzUohHViSsu444W9SzRQ,3240
105
105
  aiagents4pharma/talk2knowledgegraphs/configs/__init__.py,sha256=H-yhTbJ_RXBLe3XSto5x6FmVrgbi7y1WKEfiwmKzLAk,87
@@ -129,9 +129,9 @@ aiagents4pharma/talk2knowledgegraphs/datasets/biobridge_primekg.py,sha256=M6NtpM
129
129
  aiagents4pharma/talk2knowledgegraphs/datasets/dataset.py,sha256=ls0e15uudIbb4zwHMHxjEovmH145RJ_hPeZni89KSnM,411
130
130
  aiagents4pharma/talk2knowledgegraphs/datasets/primekg.py,sha256=1WHlQCAyKjpBiX3JnIsSohUZe8Yi5pY-VDP4tCugxkg,7709
131
131
  aiagents4pharma/talk2knowledgegraphs/datasets/starkqa_primekg.py,sha256=JtP-jNIFDA3xQbzy5DkK2OHin5NnbWUGa_EJ_1OH6vE,7483
132
- aiagents4pharma/talk2knowledgegraphs/docker-compose/cpu/.env.example,sha256=twsuiEN-FczXfka40_bVoSQXaMDR_3J3ESKCqU4qSkg,585
132
+ aiagents4pharma/talk2knowledgegraphs/docker-compose/cpu/.env.example,sha256=mfwCKG0bv6_IjEfIdQlEb6cnXsbaeAqC_U4kcIa03o0,574
133
133
  aiagents4pharma/talk2knowledgegraphs/docker-compose/cpu/docker-compose.yml,sha256=7BNUIkwP0cAUH1jznun5-RgsIAZisegLFGiiUZG9F1Y,2631
134
- aiagents4pharma/talk2knowledgegraphs/docker-compose/gpu/.env.example,sha256=twsuiEN-FczXfka40_bVoSQXaMDR_3J3ESKCqU4qSkg,585
134
+ aiagents4pharma/talk2knowledgegraphs/docker-compose/gpu/.env.example,sha256=mfwCKG0bv6_IjEfIdQlEb6cnXsbaeAqC_U4kcIa03o0,574
135
135
  aiagents4pharma/talk2knowledgegraphs/docker-compose/gpu/docker-compose.yml,sha256=MVWmuxTmTTq3g4MFi9HtvHY0F4MegtprZ7FGIt-60Ms,3001
136
136
  aiagents4pharma/talk2knowledgegraphs/states/__init__.py,sha256=9X3zHxvtAJFQ0s0VLZ_-iBn4rMVfZWk5CQiWEKJkr0c,109
137
137
  aiagents4pharma/talk2knowledgegraphs/states/state_talk2knowledgegraphs.py,sha256=QECNXd8IWDh3WlMvePcd2T6G5XqjOI9EkZdWmICcCT0,1088
@@ -330,7 +330,7 @@ aiagents4pharma/talk2scholars/tools/zotero/utils/review_helper.py,sha256=-q-UuzP
330
330
  aiagents4pharma/talk2scholars/tools/zotero/utils/write_helper.py,sha256=K1EatPfC-riGyFmkOAS3ReNBaGPY-znne1KqOnFahkI,7339
331
331
  aiagents4pharma/talk2scholars/tools/zotero/utils/zotero_path.py,sha256=sKkfJu3u4LKSZjfoQRfeqz26IESHRwBtcSDzLMLlJMo,6311
332
332
  aiagents4pharma/talk2scholars/tools/zotero/utils/zotero_pdf_downloader.py,sha256=DBrF5IiF7VRP58hUK8T9LST3lQWLFixLUfnpMSTccoQ,4614
333
- aiagents4pharma-1.47.0.dist-info/METADATA,sha256=Y7cHyuKy8HAGhEa-9SoqF6XxouOfe0RQxDDDCaqRdQI,17035
334
- aiagents4pharma-1.47.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
335
- aiagents4pharma-1.47.0.dist-info/licenses/LICENSE,sha256=IcIbyB1Hyk5ZDah03VNQvJkbNk2hkBCDqQ8qtnCvB4Q,1077
336
- aiagents4pharma-1.47.0.dist-info/RECORD,,
333
+ aiagents4pharma-1.48.0.dist-info/METADATA,sha256=LAfYILDy3HPzU2RdU1icFrP6s1N9pooLdFtRSaRzmfE,17035
334
+ aiagents4pharma-1.48.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
335
+ aiagents4pharma-1.48.0.dist-info/licenses/LICENSE,sha256=IcIbyB1Hyk5ZDah03VNQvJkbNk2hkBCDqQ8qtnCvB4Q,1077
336
+ aiagents4pharma-1.48.0.dist-info/RECORD,,