graphdatascience 1.17a1__tar.gz → 1.18a1__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 (345) hide show
  1. {graphdatascience-1.17a1/graphdatascience.egg-info → graphdatascience-1.18a1}/PKG-INFO +5 -6
  2. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/algo/algo_proc_runner.py +5 -3
  3. graphdatascience-1.18a1/graphdatascience/arrow_client/arrow_base_model.py +12 -0
  4. graphdatascience-1.18a1/graphdatascience/arrow_client/authenticated_flight_client.py +225 -0
  5. graphdatascience-1.18a1/graphdatascience/arrow_client/middleware/auth_middleware.py +63 -0
  6. graphdatascience-1.18a1/graphdatascience/arrow_client/middleware/user_agent_middleware.py +26 -0
  7. graphdatascience-1.18a1/graphdatascience/arrow_client/v2/api_types.py +49 -0
  8. graphdatascience-1.18a1/graphdatascience/arrow_client/v2/data_mapper_utils.py +19 -0
  9. graphdatascience-1.18a1/graphdatascience/arrow_client/v2/job_client.py +94 -0
  10. graphdatascience-1.18a1/graphdatascience/arrow_client/v2/mutation_client.py +52 -0
  11. graphdatascience-1.18a1/graphdatascience/arrow_client/v2/remote_write_back_client.py +83 -0
  12. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/call_parameters.py +2 -2
  13. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/error/cypher_warning_handler.py +11 -0
  14. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/graph/base_graph_proc_runner.py +18 -17
  15. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/graph/graph_alpha_proc_runner.py +3 -4
  16. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/graph/graph_beta_proc_runner.py +2 -2
  17. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/graph/graph_create_result.py +5 -5
  18. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/graph/graph_cypher_runner.py +4 -4
  19. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/graph/graph_entity_ops_runner.py +16 -14
  20. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/graph/graph_export_runner.py +7 -5
  21. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/graph/graph_object.py +6 -6
  22. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/graph/graph_project_runner.py +1 -1
  23. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/graph/graph_remote_project_runner.py +4 -6
  24. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/graph/graph_sample_runner.py +3 -1
  25. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/graph/nx_loader.py +3 -3
  26. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/graph/ogb_loader.py +8 -8
  27. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/graph_data_science.py +39 -37
  28. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/model/graphsage_model.py +4 -2
  29. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/model/model_beta_proc_runner.py +6 -4
  30. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/model/model_proc_runner.py +3 -3
  31. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/model/node_classification_model.py +4 -2
  32. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/model/simple_rel_embedding_model.py +6 -4
  33. graphdatascience-1.18a1/graphdatascience/model/v2/model.py +58 -0
  34. graphdatascience-1.18a1/graphdatascience/model/v2/model_api.py +50 -0
  35. graphdatascience-1.18a1/graphdatascience/model/v2/model_details.py +20 -0
  36. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/pipeline/classification_training_pipeline.py +5 -3
  37. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/pipeline/lp_pipeline_create_runner.py +3 -1
  38. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/pipeline/lp_training_pipeline.py +3 -1
  39. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/pipeline/nc_training_pipeline.py +6 -4
  40. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/pipeline/nr_pipeline_create_runner.py +4 -2
  41. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/pipeline/nr_training_pipeline.py +8 -6
  42. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/pipeline/pipeline_beta_proc_runner.py +6 -4
  43. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/pipeline/pipeline_proc_runner.py +6 -4
  44. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/pipeline/training_pipeline.py +12 -10
  45. graphdatascience-1.18a1/graphdatascience/procedure_surface/api/base_result.py +9 -0
  46. graphdatascience-1.18a1/graphdatascience/procedure_surface/api/catalog/catalog_endpoints.py +225 -0
  47. graphdatascience-1.18a1/graphdatascience/procedure_surface/api/catalog/graph_api.py +174 -0
  48. graphdatascience-1.18a1/graphdatascience/procedure_surface/api/catalog/graph_backend.py +19 -0
  49. graphdatascience-1.18a1/graphdatascience/procedure_surface/api/catalog/graph_info.py +40 -0
  50. graphdatascience-1.18a1/graphdatascience/procedure_surface/api/catalog/graph_sampling_endpoints.py +187 -0
  51. graphdatascience-1.18a1/graphdatascience/procedure_surface/api/catalog/node_label_endpoints.py +113 -0
  52. graphdatascience-1.18a1/graphdatascience/procedure_surface/api/catalog/node_properties_endpoints.py +168 -0
  53. graphdatascience-1.18a1/graphdatascience/procedure_surface/api/catalog/relationships_endpoints.py +259 -0
  54. graphdatascience-1.18a1/graphdatascience/procedure_surface/api/centrality/articlerank_endpoints.py +345 -0
  55. graphdatascience-1.18a1/graphdatascience/procedure_surface/api/centrality/articulationpoints_endpoints.py +244 -0
  56. graphdatascience-1.18a1/graphdatascience/procedure_surface/api/centrality/betweenness_endpoints.py +303 -0
  57. graphdatascience-1.18a1/graphdatascience/procedure_surface/api/centrality/celf_endpoints.py +313 -0
  58. graphdatascience-1.18a1/graphdatascience/procedure_surface/api/centrality/closeness_endpoints.py +280 -0
  59. graphdatascience-1.18a1/graphdatascience/procedure_surface/api/centrality/closeness_harmonic_endpoints.py +265 -0
  60. graphdatascience-1.18a1/graphdatascience/procedure_surface/api/centrality/degree_endpoints.py +299 -0
  61. graphdatascience-1.18a1/graphdatascience/procedure_surface/api/centrality/eigenvector_endpoints.py +348 -0
  62. graphdatascience-1.18a1/graphdatascience/procedure_surface/api/centrality/pagerank_endpoints.py +347 -0
  63. graphdatascience-1.18a1/graphdatascience/procedure_surface/api/community/clique_counting_endpoints.py +239 -0
  64. graphdatascience-1.18a1/graphdatascience/procedure_surface/api/community/hdbscan_endpoints.py +333 -0
  65. graphdatascience-1.18a1/graphdatascience/procedure_surface/api/community/k1coloring_endpoints.py +286 -0
  66. graphdatascience-1.18a1/graphdatascience/procedure_surface/api/community/kcore_endpoints.py +252 -0
  67. graphdatascience-1.18a1/graphdatascience/procedure_surface/api/community/kmeans_endpoints.py +391 -0
  68. graphdatascience-1.18a1/graphdatascience/procedure_surface/api/community/labelpropagation_endpoints.py +337 -0
  69. graphdatascience-1.18a1/graphdatascience/procedure_surface/api/community/leiden_endpoints.py +401 -0
  70. graphdatascience-1.18a1/graphdatascience/procedure_surface/api/community/local_clustering_coefficient_endpoints.py +279 -0
  71. graphdatascience-1.18a1/graphdatascience/procedure_surface/api/community/louvain_endpoints.py +369 -0
  72. graphdatascience-1.18a1/graphdatascience/procedure_surface/api/community/maxkcut_endpoints.py +226 -0
  73. graphdatascience-1.18a1/graphdatascience/procedure_surface/api/community/modularity_optimization_endpoints.py +356 -0
  74. graphdatascience-1.18a1/graphdatascience/procedure_surface/api/community/scc_endpoints.py +264 -0
  75. graphdatascience-1.18a1/graphdatascience/procedure_surface/api/community/sllpa_endpoints.py +343 -0
  76. graphdatascience-1.18a1/graphdatascience/procedure_surface/api/community/triangle_count_endpoints.py +375 -0
  77. graphdatascience-1.18a1/graphdatascience/procedure_surface/api/community/wcc_endpoints.py +315 -0
  78. graphdatascience-1.18a1/graphdatascience/procedure_surface/api/estimation_result.py +21 -0
  79. graphdatascience-1.18a1/graphdatascience/procedure_surface/api/model/graphsage_model.py +265 -0
  80. graphdatascience-1.18a1/graphdatascience/procedure_surface/api/node_embedding/fastrp_endpoints.py +358 -0
  81. graphdatascience-1.18a1/graphdatascience/procedure_surface/api/node_embedding/graphsage_endpoints.py +209 -0
  82. graphdatascience-1.18a1/graphdatascience/procedure_surface/api/node_embedding/graphsage_predict_endpoints.py +230 -0
  83. graphdatascience-1.18a1/graphdatascience/procedure_surface/api/node_embedding/graphsage_train_endpoints.py +152 -0
  84. graphdatascience-1.18a1/graphdatascience/procedure_surface/api/node_embedding/hashgnn_endpoints.py +270 -0
  85. graphdatascience-1.18a1/graphdatascience/procedure_surface/api/node_embedding/node2vec_endpoints.py +385 -0
  86. graphdatascience-1.18a1/graphdatascience/procedure_surface/api/similarity/knn_endpoints.py +386 -0
  87. graphdatascience-1.18a1/graphdatascience/procedure_surface/api/similarity/knn_filtered_endpoints.py +435 -0
  88. graphdatascience-1.18a1/graphdatascience/procedure_surface/api/similarity/knn_results.py +44 -0
  89. graphdatascience-1.18a1/graphdatascience/procedure_surface/api/similarity/node_similarity_endpoints.py +381 -0
  90. graphdatascience-1.18a1/graphdatascience/procedure_surface/api/similarity/node_similarity_filtered_endpoints.py +405 -0
  91. graphdatascience-1.18a1/graphdatascience/procedure_surface/api/similarity/node_similarity_results.py +35 -0
  92. graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/catalog/graph_backend_arrow.py +31 -0
  93. graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/catalog/graph_ops_arrow.py +26 -0
  94. graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/catalog/graph_sampling_arrow_endpoints.py +108 -0
  95. graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/catalog/node_label_arrow_endpoints.py +93 -0
  96. graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/catalog/node_properties_arrow_endpoints.py +146 -0
  97. graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/catalog/relationship_arrow_endpoints.py +200 -0
  98. graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/catalog_arrow_endpoints.py +273 -0
  99. graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/centrality/articlerank_arrow_endpoints.py +209 -0
  100. graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/centrality/articulationpoints_arrow_endpoints.py +152 -0
  101. graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/centrality/betweenness_arrow_endpoints.py +185 -0
  102. graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/centrality/celf_arrow_endpoints.py +190 -0
  103. graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/centrality/closeness_arrow_endpoints.py +166 -0
  104. graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/centrality/closeness_harmonic_arrow_endpoints.py +154 -0
  105. graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/centrality/degree_arrow_endpoints.py +169 -0
  106. graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/centrality/eigenvector_arrow_endpoints.py +204 -0
  107. graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/centrality/pagerank_arrow_endpoints.py +208 -0
  108. graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/community/clique_counting_arrow_endpoints.py +157 -0
  109. graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/community/hdbscan_arrow_endpoints.py +210 -0
  110. graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/community/k1coloring_arrow_endpoints.py +177 -0
  111. graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/community/kcore_arrow_endpoints.py +152 -0
  112. graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/community/kmeans_arrow_endpoints.py +248 -0
  113. graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/community/labelpropagation_arrow_endpoints.py +216 -0
  114. graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/community/leiden_arrow_endpoints.py +253 -0
  115. graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/community/local_clustering_coefficient_arrow_endpoints.py +194 -0
  116. graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/community/louvain_arrow_endpoints.py +224 -0
  117. graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/community/maxkcut_arrow_endpoints.py +127 -0
  118. graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/community/modularity_optimization_arrow_endpoints.py +230 -0
  119. graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/community/scc_arrow_endpoints.py +159 -0
  120. graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/community/sllpa_arrow_endpoints.py +189 -0
  121. graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/community/triangle_count_arrow_endpoints.py +181 -0
  122. graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/community/wcc_arrow_endpoints.py +193 -0
  123. graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/endpoints_helper_base.py +148 -0
  124. graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/model_api_arrow.py +57 -0
  125. graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/node_embedding/fastrp_arrow_endpoints.py +229 -0
  126. graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/node_embedding/graphsage_predict_arrow_endpoints.py +163 -0
  127. graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/node_embedding/graphsage_train_arrow_endpoints.py +167 -0
  128. graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/node_embedding/hashgnn_arrow_endpoints.py +215 -0
  129. graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/node_embedding/node2vec_arrow_endpoints.py +257 -0
  130. graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/node_property_endpoints.py +33 -0
  131. graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/relationship_endpoints_helper.py +43 -0
  132. graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/similarity/knn_arrow_endpoints.py +282 -0
  133. graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/similarity/knn_filtered_arrow_endpoints.py +298 -0
  134. graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/similarity/node_similarity_arrow_endpoints.py +289 -0
  135. graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/similarity/node_similarity_filtered_arrow_endpoints.py +297 -0
  136. graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/stream_result_mapper.py +7 -0
  137. graphdatascience-1.18a1/graphdatascience/procedure_surface/cypher/__init__.py +0 -0
  138. graphdatascience-1.18a1/graphdatascience/procedure_surface/cypher/catalog/__init__.py +0 -0
  139. graphdatascience-1.18a1/graphdatascience/procedure_surface/cypher/catalog/graph_backend_cypher.py +55 -0
  140. graphdatascience-1.18a1/graphdatascience/procedure_surface/cypher/catalog/graph_sampling_cypher_endpoints.py +114 -0
  141. graphdatascience-1.18a1/graphdatascience/procedure_surface/cypher/catalog/node_label_cypher_endpoints.py +80 -0
  142. graphdatascience-1.18a1/graphdatascience/procedure_surface/cypher/catalog/node_properties_cypher_endpoints.py +127 -0
  143. graphdatascience-1.18a1/graphdatascience/procedure_surface/cypher/catalog/relationship_cypher_endpoints.py +227 -0
  144. graphdatascience-1.18a1/graphdatascience/procedure_surface/cypher/catalog_cypher_endpoints.py +198 -0
  145. graphdatascience-1.18a1/graphdatascience/procedure_surface/cypher/centrality/__init__.py +0 -0
  146. graphdatascience-1.18a1/graphdatascience/procedure_surface/cypher/centrality/articlerank_cypher_endpoints.py +228 -0
  147. graphdatascience-1.18a1/graphdatascience/procedure_surface/cypher/centrality/articulationpoints_cypher_endpoints.py +171 -0
  148. graphdatascience-1.18a1/graphdatascience/procedure_surface/cypher/centrality/betweenness_cypher_endpoints.py +197 -0
  149. graphdatascience-1.18a1/graphdatascience/procedure_surface/cypher/centrality/celf_cypher_endpoints.py +209 -0
  150. graphdatascience-1.18a1/graphdatascience/procedure_surface/cypher/centrality/closeness_cypher_endpoints.py +180 -0
  151. graphdatascience-1.18a1/graphdatascience/procedure_surface/cypher/centrality/closeness_harmonic_cypher_endpoints.py +176 -0
  152. graphdatascience-1.18a1/graphdatascience/procedure_surface/cypher/centrality/degree_cypher_endpoints.py +190 -0
  153. graphdatascience-1.18a1/graphdatascience/procedure_surface/cypher/centrality/eigenvector_cypher_endpoints.py +221 -0
  154. graphdatascience-1.18a1/graphdatascience/procedure_surface/cypher/centrality/pagerank_cypher_endpoints.py +229 -0
  155. graphdatascience-1.18a1/graphdatascience/procedure_surface/cypher/community/__init__.py +0 -0
  156. graphdatascience-1.18a1/graphdatascience/procedure_surface/cypher/community/clique_counting_cypher_endpoints.py +170 -0
  157. graphdatascience-1.18a1/graphdatascience/procedure_surface/cypher/community/hdbscan_cypher_endpoints.py +225 -0
  158. graphdatascience-1.18a1/graphdatascience/procedure_surface/cypher/community/k1coloring_cypher_endpoints.py +188 -0
  159. graphdatascience-1.18a1/graphdatascience/procedure_surface/cypher/community/kcore_cypher_endpoints.py +169 -0
  160. graphdatascience-1.18a1/graphdatascience/procedure_surface/cypher/community/kmeans_cypher_endpoints.py +262 -0
  161. graphdatascience-1.18a1/graphdatascience/procedure_surface/cypher/community/labelpropagation_cypher_endpoints.py +229 -0
  162. graphdatascience-1.18a1/graphdatascience/procedure_surface/cypher/community/leiden_cypher_endpoints.py +267 -0
  163. graphdatascience-1.18a1/graphdatascience/procedure_surface/cypher/community/local_clustering_coefficient_cypher_endpoints.py +190 -0
  164. graphdatascience-1.18a1/graphdatascience/procedure_surface/cypher/community/louvain_cypher_endpoints.py +238 -0
  165. graphdatascience-1.18a1/graphdatascience/procedure_surface/cypher/community/maxkcut_cypher_endpoints.py +127 -0
  166. graphdatascience-1.18a1/graphdatascience/procedure_surface/cypher/community/modularity_optimization_cypher_endpoints.py +243 -0
  167. graphdatascience-1.18a1/graphdatascience/procedure_surface/cypher/community/scc_cypher_endpoints.py +175 -0
  168. graphdatascience-1.18a1/graphdatascience/procedure_surface/cypher/community/sllpa_cypher_endpoints.py +207 -0
  169. graphdatascience-1.18a1/graphdatascience/procedure_surface/cypher/community/triangle_count_cypher_endpoints.py +179 -0
  170. graphdatascience-1.18a1/graphdatascience/procedure_surface/cypher/community/wcc_cypher_endpoints.py +209 -0
  171. graphdatascience-1.18a1/graphdatascience/procedure_surface/cypher/estimation_utils.py +60 -0
  172. graphdatascience-1.18a1/graphdatascience/procedure_surface/cypher/model_api_cypher.py +49 -0
  173. graphdatascience-1.18a1/graphdatascience/procedure_surface/cypher/node_embedding/__init__.py +0 -0
  174. graphdatascience-1.18a1/graphdatascience/procedure_surface/cypher/node_embedding/fastrp_cypher_endpoints.py +250 -0
  175. graphdatascience-1.18a1/graphdatascience/procedure_surface/cypher/node_embedding/graphsage_predict_cypher_endpoints.py +160 -0
  176. graphdatascience-1.18a1/graphdatascience/procedure_surface/cypher/node_embedding/graphsage_train_cypher_endpoints.py +157 -0
  177. graphdatascience-1.18a1/graphdatascience/procedure_surface/cypher/node_embedding/hashgnn_cypher_endpoints.py +222 -0
  178. graphdatascience-1.18a1/graphdatascience/procedure_surface/cypher/node_embedding/node2vec_cypher_endpoints.py +259 -0
  179. graphdatascience-1.18a1/graphdatascience/procedure_surface/cypher/similarity/__init__.py +0 -0
  180. graphdatascience-1.18a1/graphdatascience/procedure_surface/cypher/similarity/knn_cypher_endpoints.py +274 -0
  181. graphdatascience-1.18a1/graphdatascience/procedure_surface/cypher/similarity/knn_filtered_cypher_endpoints.py +290 -0
  182. graphdatascience-1.18a1/graphdatascience/procedure_surface/cypher/similarity/node_similarity_cypher_endpoints.py +272 -0
  183. graphdatascience-1.18a1/graphdatascience/procedure_surface/cypher/similarity/node_similarity_filtered_cypher_endpoints.py +286 -0
  184. graphdatascience-1.18a1/graphdatascience/procedure_surface/utils/__init__.py +0 -0
  185. graphdatascience-1.18a1/graphdatascience/procedure_surface/utils/config_converter.py +38 -0
  186. graphdatascience-1.18a1/graphdatascience/procedure_surface/utils/result_utils.py +41 -0
  187. graphdatascience-1.18a1/graphdatascience/py.typed +0 -0
  188. graphdatascience-1.18a1/graphdatascience/query_runner/__init__.py +0 -0
  189. graphdatascience-1.18a1/graphdatascience/query_runner/arrow_authentication/__init__.py +3 -0
  190. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/query_runner/arrow_graph_constructor.py +2 -2
  191. graphdatascience-1.18a1/graphdatascience/query_runner/arrow_info/__init__.py +5 -0
  192. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/query_runner/arrow_query_runner.py +20 -20
  193. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/query_runner/cypher_graph_constructor.py +3 -3
  194. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/query_runner/gds_arrow_client.py +91 -93
  195. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/query_runner/neo4j_query_runner.py +69 -44
  196. graphdatascience-1.18a1/graphdatascience/query_runner/progress/__init__.py +0 -0
  197. graphdatascience-1.18a1/graphdatascience/query_runner/progress/progress_bar.py +70 -0
  198. graphdatascience-1.18a1/graphdatascience/query_runner/progress/progress_provider.py +23 -0
  199. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/query_runner/progress/query_progress_logger.py +23 -54
  200. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/query_runner/progress/query_progress_provider.py +3 -3
  201. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/query_runner/progress/static_progress_provider.py +1 -3
  202. graphdatascience-1.18a1/graphdatascience/query_runner/protocol/__init__.py +0 -0
  203. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/query_runner/protocol/project_protocols.py +9 -9
  204. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/query_runner/protocol/write_protocols.py +38 -14
  205. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/query_runner/query_runner.py +16 -16
  206. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/query_runner/session_query_runner.py +23 -21
  207. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/query_runner/standalone_session_query_runner.py +16 -16
  208. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/query_runner/termination_flag.py +2 -3
  209. graphdatascience-1.18a1/graphdatascience/resources/__init__.py +0 -0
  210. graphdatascience-1.18a1/graphdatascience/resources/cora/__init__.py +0 -0
  211. graphdatascience-1.18a1/graphdatascience/resources/imdb/__init__.py +0 -0
  212. graphdatascience-1.18a1/graphdatascience/resources/karate/__init__.py +0 -0
  213. graphdatascience-1.18a1/graphdatascience/resources/lastfm/__init__.py +0 -0
  214. graphdatascience-1.18a1/graphdatascience/retry_utils/__init__.py +0 -0
  215. graphdatascience-1.18a1/graphdatascience/retry_utils/neo4j_retry_helper.py +12 -0
  216. graphdatascience-1.18a1/graphdatascience/semantic_version/__init__.py +0 -0
  217. graphdatascience-1.18a1/graphdatascience/server_version/__init__.py +0 -0
  218. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/server_version/compatible_with.py +2 -2
  219. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/session/aura_api.py +13 -13
  220. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/session/aura_api_responses.py +7 -7
  221. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/session/aura_graph_data_science.py +30 -10
  222. graphdatascience-1.18a1/graphdatascience/session/aurads_sessions.py +0 -0
  223. graphdatascience-1.18a1/graphdatascience/session/dbms/__init__.py +0 -0
  224. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/session/dbms/protocol_resolver.py +1 -3
  225. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/session/dbms_connection_info.py +5 -6
  226. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/session/dedicated_sessions.py +18 -18
  227. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/session/gds_sessions.py +18 -18
  228. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/session/region_suggester.py +2 -2
  229. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/session/session_info.py +10 -11
  230. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/session/session_sizes.py +1 -2
  231. graphdatascience-1.18a1/graphdatascience/session/session_v2_endpoints.py +228 -0
  232. graphdatascience-1.18a1/graphdatascience/system/__init__.py +0 -0
  233. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/system/config_endpoints.py +3 -3
  234. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/system/system_endpoints.py +12 -10
  235. graphdatascience-1.18a1/graphdatascience/topological_lp/__init__.py +0 -0
  236. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/topological_lp/topological_lp_alpha_runner.py +2 -2
  237. graphdatascience-1.18a1/graphdatascience/utils/__init__.py +0 -0
  238. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/version.py +1 -1
  239. {graphdatascience-1.17a1 → graphdatascience-1.18a1/graphdatascience.egg-info}/PKG-INFO +5 -6
  240. graphdatascience-1.18a1/graphdatascience.egg-info/SOURCES.txt +340 -0
  241. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience.egg-info/requires.txt +3 -3
  242. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/requirements/base/base.txt +3 -3
  243. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/setup.py +1 -2
  244. graphdatascience-1.17a1/graphdatascience/procedure_surface/arrow/wcc_arrow_endpoints.py +0 -191
  245. graphdatascience-1.17a1/graphdatascience/query_runner/progress/progress_provider.py +0 -18
  246. graphdatascience-1.17a1/graphdatascience.egg-info/SOURCES.txt +0 -165
  247. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/LICENSE +0 -0
  248. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/MANIFEST.in +0 -0
  249. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/README.md +0 -0
  250. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/__init__.py +0 -0
  251. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/algo/__init__.py +0 -0
  252. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/algo/algo_endpoints.py +0 -0
  253. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/algo/single_mode_algo_endpoints.py +0 -0
  254. {graphdatascience-1.17a1/graphdatascience/error → graphdatascience-1.18a1/graphdatascience/arrow_client}/__init__.py +0 -0
  255. {graphdatascience-1.17a1/graphdatascience/query_runner → graphdatascience-1.18a1/graphdatascience/arrow_client}/arrow_authentication.py +0 -0
  256. {graphdatascience-1.17a1/graphdatascience/query_runner → graphdatascience-1.18a1/graphdatascience/arrow_client}/arrow_info.py +0 -0
  257. {graphdatascience-1.17a1/graphdatascience/graph → graphdatascience-1.18a1/graphdatascience/arrow_client/middleware}/__init__.py +0 -0
  258. {graphdatascience-1.17a1/graphdatascience/model → graphdatascience-1.18a1/graphdatascience/arrow_client/v2}/__init__.py +0 -0
  259. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/call_builder.py +0 -0
  260. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/caller_base.py +0 -0
  261. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/endpoints.py +0 -0
  262. {graphdatascience-1.17a1/graphdatascience/pipeline → graphdatascience-1.18a1/graphdatascience/error}/__init__.py +0 -0
  263. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/error/client_only_endpoint.py +0 -0
  264. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/error/endpoint_suggester.py +0 -0
  265. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/error/gds_not_installed.py +0 -0
  266. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/error/illegal_attr_checker.py +0 -0
  267. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/error/unable_to_connect.py +0 -0
  268. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/error/uncallable_namespace.py +0 -0
  269. {graphdatascience-1.17a1/graphdatascience/procedure_surface → graphdatascience-1.18a1/graphdatascience/graph}/__init__.py +0 -0
  270. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/graph/graph_endpoints.py +0 -0
  271. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/graph/graph_proc_runner.py +0 -0
  272. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/graph/graph_remote_proc_runner.py +0 -0
  273. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/graph/graph_type_check.py +0 -0
  274. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/ignored_server_endpoints.py +0 -0
  275. {graphdatascience-1.17a1/graphdatascience/procedure_surface/arrow → graphdatascience-1.18a1/graphdatascience/model}/__init__.py +0 -0
  276. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/model/link_prediction_model.py +0 -0
  277. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/model/model.py +0 -0
  278. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/model/model_alpha_proc_runner.py +0 -0
  279. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/model/model_endpoints.py +0 -0
  280. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/model/model_resolver.py +0 -0
  281. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/model/node_regression_model.py +0 -0
  282. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/model/pipeline_model.py +0 -0
  283. {graphdatascience-1.17a1/graphdatascience/query_runner → graphdatascience-1.18a1/graphdatascience/model/v2}/__init__.py +0 -0
  284. /graphdatascience-1.17a1/graphdatascience/py.typed → /graphdatascience-1.18a1/graphdatascience/model/v2/graphsage_model.py +0 -0
  285. {graphdatascience-1.17a1/graphdatascience/query_runner/progress → graphdatascience-1.18a1/graphdatascience/pipeline}/__init__.py +0 -0
  286. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/pipeline/nc_pipeline_create_runner.py +0 -0
  287. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/pipeline/pipeline_alpha_proc_runner.py +0 -0
  288. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/pipeline/pipeline_endpoints.py +0 -0
  289. {graphdatascience-1.17a1/graphdatascience/query_runner/protocol → graphdatascience-1.18a1/graphdatascience/procedure_surface}/__init__.py +0 -0
  290. {graphdatascience-1.17a1/graphdatascience/resources → graphdatascience-1.18a1/graphdatascience/procedure_surface/api}/__init__.py +0 -0
  291. {graphdatascience-1.17a1/graphdatascience/resources/cora → graphdatascience-1.18a1/graphdatascience/procedure_surface/api/catalog}/__init__.py +0 -0
  292. {graphdatascience-1.17a1/graphdatascience/resources/imdb → graphdatascience-1.18a1/graphdatascience/procedure_surface/api/centrality}/__init__.py +0 -0
  293. {graphdatascience-1.17a1/graphdatascience/resources/karate → graphdatascience-1.18a1/graphdatascience/procedure_surface/api/community}/__init__.py +0 -0
  294. {graphdatascience-1.17a1/graphdatascience/resources/lastfm → graphdatascience-1.18a1/graphdatascience/procedure_surface/api/model}/__init__.py +0 -0
  295. {graphdatascience-1.17a1/graphdatascience/retry_utils → graphdatascience-1.18a1/graphdatascience/procedure_surface/api/node_embedding}/__init__.py +0 -0
  296. {graphdatascience-1.17a1/graphdatascience/semantic_version → graphdatascience-1.18a1/graphdatascience/procedure_surface/api/similarity}/__init__.py +0 -0
  297. {graphdatascience-1.17a1/graphdatascience/server_version → graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow}/__init__.py +0 -0
  298. {graphdatascience-1.17a1/graphdatascience/session/dbms → graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/catalog}/__init__.py +0 -0
  299. {graphdatascience-1.17a1/graphdatascience/system → graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/centrality}/__init__.py +0 -0
  300. {graphdatascience-1.17a1/graphdatascience/topological_lp → graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/community}/__init__.py +0 -0
  301. {graphdatascience-1.17a1/graphdatascience/utils → graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/node_embedding}/__init__.py +0 -0
  302. /graphdatascience-1.17a1/graphdatascience/session/aurads_sessions.py → /graphdatascience-1.18a1/graphdatascience/procedure_surface/arrow/similarity/__init__.py +0 -0
  303. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/query_runner/arrow_endpoint_version.py +0 -0
  304. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/query_runner/graph_constructor.py +0 -0
  305. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/query_runner/protocol/status.py +0 -0
  306. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/query_runner/query_mode.py +0 -0
  307. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/resources/cora/cora_nodes.parquet.gzip +0 -0
  308. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/resources/cora/cora_rels.parquet.gzip +0 -0
  309. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/resources/cora/serialize_cora.py +0 -0
  310. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/resources/imdb/imdb_acted_in.parquet.gzip +0 -0
  311. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/resources/imdb/imdb_actors.parquet.gzip +0 -0
  312. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/resources/imdb/imdb_directed_in.parquet.gzip +0 -0
  313. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/resources/imdb/imdb_directors.parquet.gzip +0 -0
  314. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/resources/imdb/imdb_movies_with_genre.parquet.gzip +0 -0
  315. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/resources/imdb/imdb_movies_without_genre.parquet.gzip +0 -0
  316. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/resources/imdb/serialize_imdb.py +0 -0
  317. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/resources/karate/karate_club.parquet.gzip +0 -0
  318. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/resources/lastfm/artist_nodes.parquet.gzip +0 -0
  319. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/resources/lastfm/serialize_lastfm.py +0 -0
  320. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/resources/lastfm/user_friend_df_directed.parquet.gzip +0 -0
  321. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/resources/lastfm/user_listen_artist_rels.parquet.gzip +0 -0
  322. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/resources/lastfm/user_nodes.parquet.gzip +0 -0
  323. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/resources/lastfm/user_tag_artist_rels.parquet.gzip +0 -0
  324. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/retry_utils/retry_config.py +0 -0
  325. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/retry_utils/retry_utils.py +0 -0
  326. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/semantic_version/semantic_version.py +0 -0
  327. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/server_version/server_version.py +0 -0
  328. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/session/__init__.py +0 -0
  329. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/session/algorithm_category.py +0 -0
  330. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/session/aura_api_token_authentication.py +0 -0
  331. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/session/cloud_location.py +0 -0
  332. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/session/dbms/protocol_version.py +0 -0
  333. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/topological_lp/topological_lp_endpoints.py +0 -0
  334. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/utils/direct_util_endpoints.py +0 -0
  335. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/utils/util_node_property_func_runner.py +0 -0
  336. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/utils/util_proc_runner.py +0 -0
  337. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience/utils/util_remote_proc_runner.py +0 -0
  338. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience.egg-info/dependency_links.txt +0 -0
  339. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience.egg-info/not-zip-safe +0 -0
  340. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/graphdatascience.egg-info/top_level.txt +0 -0
  341. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/pyproject.toml +0 -0
  342. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/requirements/base/networkx.txt +0 -0
  343. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/requirements/base/ogb.txt +0 -0
  344. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/requirements/base/rust-ext.txt +0 -0
  345. {graphdatascience-1.17a1 → graphdatascience-1.18a1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: graphdatascience
3
- Version: 1.17a1
3
+ Version: 1.18a1
4
4
  Summary: A Python client for the Neo4j Graph Data Science (GDS) library
5
5
  Home-page: https://neo4j.com/product/graph-data-science/
6
6
  Author: Neo4j
@@ -16,7 +16,6 @@ Classifier: License :: OSI Approved :: Apache Software License
16
16
  Classifier: Operating System :: OS Independent
17
17
  Classifier: Programming Language :: Python :: 3
18
18
  Classifier: Programming Language :: Python :: 3 :: Only
19
- Classifier: Programming Language :: Python :: 3.9
20
19
  Classifier: Programming Language :: Python :: 3.10
21
20
  Classifier: Programming Language :: Python :: 3.11
22
21
  Classifier: Programming Language :: Python :: 3.12
@@ -25,14 +24,14 @@ Classifier: Topic :: Database
25
24
  Classifier: Topic :: Scientific/Engineering
26
25
  Classifier: Topic :: Software Development
27
26
  Classifier: Typing :: Typed
28
- Requires-Python: >=3.9
27
+ Requires-Python: >=3.10
29
28
  Description-Content-Type: text/markdown
30
29
  License-File: LICENSE
31
30
  Requires-Dist: multimethod<3.0,>=1.0
32
- Requires-Dist: neo4j<6.0,>=4.4.12
33
- Requires-Dist: numpy<2.3
31
+ Requires-Dist: neo4j<7.0,>=4.4.12
32
+ Requires-Dist: numpy<2.4
34
33
  Requires-Dist: pandas<3.0,>=1.0
35
- Requires-Dist: pyarrow<21.0,>=17.0
34
+ Requires-Dist: pyarrow<22.0,>=17.0
36
35
  Requires-Dist: textdistance<5.0,>=4.0
37
36
  Requires-Dist: tqdm<5.0,>=4.0
38
37
  Requires-Dist: typing-extensions<5.0,>=4.0
@@ -1,3 +1,5 @@
1
+ from __future__ import annotations
2
+
1
3
  from abc import ABC
2
4
  from typing import Any
3
5
 
@@ -19,7 +21,7 @@ class AlgoProcRunner(IllegalAttrChecker, ABC):
19
21
  return self._query_runner.call_procedure(endpoint=self._namespace, params=params, logging=with_logging)
20
22
 
21
23
  @graph_type_check
22
- def estimate(self, G: Graph, **config: Any) -> "Series[Any]":
24
+ def estimate(self, G: Graph, **config: Any) -> Series[Any]:
23
25
  self._namespace += "." + "estimate"
24
26
  return self._run_procedure(G, config, with_logging=False).squeeze() # type: ignore
25
27
 
@@ -30,13 +32,13 @@ class StreamModeRunner(AlgoProcRunner):
30
32
 
31
33
 
32
34
  class StandardModeRunner(AlgoProcRunner):
33
- def __call__(self, G: Graph, **config: Any) -> "Series[Any]":
35
+ def __call__(self, G: Graph, **config: Any) -> Series[Any]:
34
36
  return self._run_procedure(G, config).squeeze() # type: ignore
35
37
 
36
38
 
37
39
  class GraphSageRunner(AlgoProcRunner):
38
40
  @graph_type_check
39
- def __call__(self, G: Graph, **config: Any) -> tuple[GraphSageModel, "Series[Any]"]:
41
+ def __call__(self, G: Graph, **config: Any) -> tuple[GraphSageModel, Series[Any]]:
40
42
  result = self._run_procedure(G, config).squeeze()
41
43
  model_name = result["modelInfo"]["modelName"]
42
44
 
@@ -0,0 +1,12 @@
1
+ from typing import Any
2
+
3
+ from pydantic import BaseModel
4
+ from pydantic.alias_generators import to_camel
5
+
6
+
7
+ class ArrowBaseModel(BaseModel, alias_generator=to_camel):
8
+ def dump_camel(self) -> dict[str, Any]:
9
+ return self.model_dump(by_alias=True)
10
+
11
+ def dump_json(self) -> str:
12
+ return self.model_dump_json(by_alias=True)
@@ -0,0 +1,225 @@
1
+ from __future__ import annotations
2
+
3
+ import json
4
+ import logging
5
+ from dataclasses import dataclass
6
+ from typing import Any, Iterator
7
+
8
+ from pyarrow import __version__ as arrow_version
9
+ from pyarrow import flight
10
+ from pyarrow._flight import (
11
+ Action,
12
+ ActionType,
13
+ FlightInternalError,
14
+ FlightStreamReader,
15
+ FlightTimedOutError,
16
+ FlightUnavailableError,
17
+ Result,
18
+ Ticket,
19
+ )
20
+ from tenacity import retry, retry_any, retry_if_exception_type, stop_after_attempt, stop_after_delay, wait_exponential
21
+
22
+ from graphdatascience.arrow_client.arrow_authentication import ArrowAuthentication
23
+ from graphdatascience.arrow_client.arrow_info import ArrowInfo
24
+ from graphdatascience.retry_utils.retry_config import RetryConfig
25
+
26
+ from ..retry_utils.retry_utils import before_log
27
+ from ..version import __version__
28
+ from .middleware.auth_middleware import AuthFactory, AuthMiddleware
29
+ from .middleware.user_agent_middleware import UserAgentFactory
30
+
31
+
32
+ class AuthenticatedArrowClient:
33
+ @staticmethod
34
+ def create(
35
+ arrow_info: ArrowInfo,
36
+ auth: ArrowAuthentication | None = None,
37
+ encrypted: bool = False,
38
+ arrow_client_options: dict[str, Any] | None = None,
39
+ connection_string_override: str | None = None,
40
+ retry_config: RetryConfig | None = None,
41
+ advertised_listen_address: tuple[str, int] | None = None,
42
+ ) -> AuthenticatedArrowClient:
43
+ connection_string: str
44
+ if connection_string_override is not None:
45
+ connection_string = connection_string_override
46
+ else:
47
+ connection_string = arrow_info.listenAddress
48
+
49
+ host, port = connection_string.split(":")
50
+
51
+ if retry_config is None:
52
+ retry_config = RetryConfig(
53
+ retry=retry_any(
54
+ retry_if_exception_type(FlightTimedOutError),
55
+ retry_if_exception_type(FlightUnavailableError),
56
+ retry_if_exception_type(FlightInternalError),
57
+ ),
58
+ stop=(stop_after_delay(10) | stop_after_attempt(5)),
59
+ wait=wait_exponential(multiplier=1, min=1, max=10),
60
+ )
61
+
62
+ return AuthenticatedArrowClient(
63
+ host=host,
64
+ retry_config=retry_config,
65
+ port=int(port),
66
+ auth=auth,
67
+ encrypted=encrypted,
68
+ arrow_client_options=arrow_client_options,
69
+ advertised_listen_address=advertised_listen_address,
70
+ )
71
+
72
+ def __init__(
73
+ self,
74
+ host: str,
75
+ retry_config: RetryConfig,
76
+ port: int = 8491,
77
+ auth: ArrowAuthentication | None = None,
78
+ encrypted: bool = False,
79
+ arrow_client_options: dict[str, Any] | None = None,
80
+ user_agent: str | None = None,
81
+ advertised_listen_address: tuple[str, int] | None = None,
82
+ ):
83
+ """Creates a new GdsArrowClient instance.
84
+
85
+ Parameters
86
+ ----------
87
+ host: str
88
+ The host address of the GDS Arrow server
89
+ port: int
90
+ The host port of the GDS Arrow server (default is 8491)
91
+ auth: ArrowAuthentication | None
92
+ An implementation of ArrowAuthentication providing a pair to be used for basic authentication
93
+ encrypted: bool
94
+ A flag that indicates whether the connection should be encrypted (default is False)
95
+ arrow_client_options: dict[str, Any] | None
96
+ Additional options to be passed to the Arrow Flight client.
97
+ user_agent: str | None
98
+ The user agent string to use for the connection. (default is `neo4j-graphdatascience-v[VERSION] pyarrow-v[PYARROW_VERSION])
99
+ retry_config: RetryConfig | None
100
+ The retry configuration to use for the Arrow requests send by the client.
101
+ advertised_listen_address: tuple[str, int] | None
102
+ The advertised listen address of the GDS Arrow server. This will be used by remote projection and writeback operations.
103
+ """
104
+ self._host = host
105
+ self._port = port
106
+ self._auth = None
107
+ self._encrypted = encrypted
108
+ self._arrow_client_options = arrow_client_options
109
+ self._user_agent = user_agent
110
+ self._retry_config = retry_config
111
+ self._logger = logging.getLogger("gds_arrow_client")
112
+ self._retry_config = retry_config
113
+ if auth:
114
+ self._auth = auth
115
+ self._auth_middleware = AuthMiddleware(auth)
116
+ self.advertised_listen_address = advertised_listen_address
117
+
118
+ self._flight_client = self._instantiate_flight_client()
119
+
120
+ def connection_info(self) -> ConnectionInfo:
121
+ """
122
+ Returns the host and port of the GDS Arrow server.
123
+
124
+ Returns
125
+ -------
126
+ tuple[str, int]
127
+ the host and port of the GDS Arrow server
128
+ """
129
+ return ConnectionInfo(self._host, self._port, self._encrypted)
130
+
131
+ def advertised_connection_info(self) -> ConnectionInfo:
132
+ """
133
+ Returns the advertised host and port of the GDS Arrow server.
134
+
135
+ Returns
136
+ -------
137
+ ConnectionInfo
138
+ the host and port of the GDS Arrow server
139
+ """
140
+ if self.advertised_listen_address is None:
141
+ return self.connection_info()
142
+
143
+ h, p = self.advertised_listen_address
144
+ return ConnectionInfo(h, p, self._encrypted)
145
+
146
+ def request_token(self) -> str | None:
147
+ """
148
+ Requests a token from the server and returns it.
149
+
150
+ Returns
151
+ -------
152
+ str | None
153
+ a token from the server and returns it.
154
+ """
155
+
156
+ @retry(
157
+ reraise=True,
158
+ before=before_log("Request token", self._logger, logging.DEBUG),
159
+ retry=self._retry_config.retry,
160
+ stop=self._retry_config.stop,
161
+ wait=self._retry_config.wait,
162
+ )
163
+ def auth_with_retry() -> None:
164
+ client = self._flight_client
165
+ if self._auth:
166
+ auth_pair = self._auth.auth_pair()
167
+ client.authenticate_basic_token(auth_pair[0], auth_pair[1])
168
+
169
+ if self._auth:
170
+ auth_with_retry()
171
+ return self._auth_middleware.token()
172
+ else:
173
+ return "IGNORED"
174
+
175
+ def get_stream(self, ticket: Ticket) -> FlightStreamReader:
176
+ return self._flight_client.do_get(ticket)
177
+
178
+ def do_action(self, endpoint: str, payload: bytes | dict[str, Any]) -> Iterator[Result]:
179
+ payload_bytes = payload if isinstance(payload, bytes) else json.dumps(payload).encode("utf-8")
180
+
181
+ return self._flight_client.do_action(Action(endpoint, payload_bytes)) # type: ignore
182
+
183
+ def do_action_with_retry(self, endpoint: str, payload: bytes | dict[str, Any]) -> list[Result]:
184
+ @retry(
185
+ reraise=True,
186
+ before=before_log("Send action", self._logger, logging.DEBUG),
187
+ retry=self._retry_config.retry,
188
+ stop=self._retry_config.stop,
189
+ wait=self._retry_config.wait,
190
+ )
191
+ def run_with_retry() -> list[Result]:
192
+ # the Flight response error code is only checked on iterator consumption
193
+ # we eagerly collect iterator here to trigger retry in case of an error
194
+ return list(self.do_action(endpoint, payload))
195
+
196
+ return run_with_retry()
197
+
198
+ def list_actions(self) -> set[ActionType]:
199
+ return self._flight_client.list_actions() # type: ignore
200
+
201
+ def _instantiate_flight_client(self) -> flight.FlightClient:
202
+ location = (
203
+ flight.Location.for_grpc_tls(self._host, self._port)
204
+ if self._encrypted
205
+ else flight.Location.for_grpc_tcp(self._host, self._port)
206
+ )
207
+ client_options: dict[str, Any] = (self._arrow_client_options or {}).copy()
208
+ if self._auth:
209
+ user_agent = f"neo4j-graphdatascience-v{__version__} pyarrow-v{arrow_version}"
210
+ if self._user_agent:
211
+ user_agent = self._user_agent
212
+
213
+ client_options["middleware"] = [
214
+ AuthFactory(self._auth_middleware),
215
+ UserAgentFactory(useragent=user_agent),
216
+ ]
217
+
218
+ return flight.FlightClient(location, **client_options)
219
+
220
+
221
+ @dataclass
222
+ class ConnectionInfo:
223
+ host: str
224
+ port: int
225
+ encrypted: bool
@@ -0,0 +1,63 @@
1
+ from __future__ import annotations
2
+
3
+ import base64
4
+ import time
5
+ from typing import Any
6
+
7
+ from pyarrow._flight import ClientMiddleware, ClientMiddlewareFactory
8
+
9
+ from graphdatascience.arrow_client.arrow_authentication import ArrowAuthentication
10
+
11
+
12
+ class AuthFactory(ClientMiddlewareFactory): # type: ignore
13
+ def __init__(self, middleware: AuthMiddleware, *args: Any, **kwargs: Any) -> None:
14
+ super().__init__(*args, **kwargs)
15
+ self._middleware = middleware
16
+
17
+ def start_call(self, info: Any) -> AuthMiddleware:
18
+ return self._middleware
19
+
20
+
21
+ class AuthMiddleware(ClientMiddleware): # type: ignore
22
+ def __init__(self, auth: ArrowAuthentication, *args: Any, **kwargs: Any) -> None:
23
+ super().__init__(*args, **kwargs)
24
+ self._auth = auth
25
+ self._token: str | None = None
26
+ self._token_timestamp = 0
27
+
28
+ def token(self) -> str | None:
29
+ # check whether the token is older than 10 minutes. If so, reset it.
30
+ if self._token and int(time.time()) - self._token_timestamp > 600:
31
+ self._token = None
32
+
33
+ return self._token
34
+
35
+ def _set_token(self, token: str) -> None:
36
+ self._token = token
37
+ self._token_timestamp = int(time.time())
38
+
39
+ def received_headers(self, headers: dict[str, Any]) -> None:
40
+ auth_header = headers.get("authorization", None)
41
+ if not auth_header:
42
+ return
43
+
44
+ # the result is always a list
45
+ header_value = auth_header[0]
46
+
47
+ if not isinstance(header_value, str):
48
+ raise ValueError(f"Incompatible header value received from server: `{header_value}`")
49
+
50
+ auth_type, token = header_value.split(" ", 1)
51
+ if auth_type == "Bearer":
52
+ self._set_token(token)
53
+
54
+ def sending_headers(self) -> dict[str, str]:
55
+ token = self.token()
56
+ if token is not None:
57
+ return {"authorization": "Bearer " + token}
58
+
59
+ auth_pair = self._auth.auth_pair()
60
+ auth_token = f"{auth_pair[0]}:{auth_pair[1]}"
61
+ auth_token = "Basic " + base64.b64encode(auth_token.encode("utf-8")).decode("ASCII")
62
+ # There seems to be a bug, `authorization` must be lower key
63
+ return {"authorization": auth_token}
@@ -0,0 +1,26 @@
1
+ from __future__ import annotations
2
+
3
+ from typing import Any
4
+
5
+ from pyarrow._flight import ClientMiddleware, ClientMiddlewareFactory
6
+
7
+
8
+ class UserAgentFactory(ClientMiddlewareFactory): # type: ignore
9
+ def __init__(self, useragent: str, *args: Any, **kwargs: Any) -> None:
10
+ super().__init__(*args, **kwargs)
11
+ self._middleware = UserAgentMiddleware(useragent)
12
+
13
+ def start_call(self, info: Any) -> ClientMiddleware:
14
+ return self._middleware
15
+
16
+
17
+ class UserAgentMiddleware(ClientMiddleware): # type: ignore
18
+ def __init__(self, useragent: str, *args: Any, **kwargs: Any) -> None:
19
+ super().__init__(*args, **kwargs)
20
+ self._useragent = useragent
21
+
22
+ def sending_headers(self) -> dict[str, str]:
23
+ return {"x-gds-user-agent": self._useragent}
24
+
25
+ def received_headers(self, headers: dict[str, Any]) -> None:
26
+ pass
@@ -0,0 +1,49 @@
1
+ from graphdatascience.arrow_client.arrow_base_model import ArrowBaseModel
2
+
3
+
4
+ class JobIdConfig(ArrowBaseModel):
5
+ job_id: str
6
+
7
+
8
+ UNKNOWN_PROGRESS = -1
9
+
10
+
11
+ class JobStatus(ArrowBaseModel):
12
+ job_id: str
13
+ status: str
14
+ progress: float
15
+ description: str
16
+
17
+ def progress_known(self) -> bool:
18
+ if self.progress == UNKNOWN_PROGRESS:
19
+ return False
20
+ return True
21
+
22
+ def progress_percent(self) -> float | None:
23
+ if self.progress_known():
24
+ return self.progress * 100
25
+ return None
26
+
27
+ def base_task(self) -> str:
28
+ return self.description.split("::")[0].strip()
29
+
30
+ def sub_tasks(self) -> str | None:
31
+ task_split = self.description.split("::", maxsplit=1)
32
+ if len(task_split) > 1:
33
+ return task_split[1].strip()
34
+ return None
35
+
36
+ def aborted(self) -> bool:
37
+ return self.status == "Aborted"
38
+
39
+ def succeeded(self) -> bool:
40
+ return self.status == "Done"
41
+
42
+ def running(self) -> bool:
43
+ return self.status == "Running"
44
+
45
+
46
+ class MutateResult(ArrowBaseModel):
47
+ mutate_millis: int
48
+ node_properties_written: int
49
+ relationships_written: int
@@ -0,0 +1,19 @@
1
+ import json
2
+ from typing import Any
3
+
4
+ from pyarrow._flight import Result
5
+
6
+
7
+ def deserialize_single(input_stream: list[Result]) -> dict[str, Any]:
8
+ rows = deserialize(input_stream)
9
+ if len(rows) != 1:
10
+ raise ValueError(f"Expected exactly one result, got {len(rows)}")
11
+
12
+ return rows[0]
13
+
14
+
15
+ def deserialize(input_stream: list[Result]) -> list[dict[str, Any]]:
16
+ def deserialize_row(row: Result): # type:ignore
17
+ return json.loads(row.body.to_pybytes().decode())
18
+
19
+ return [deserialize_row(row) for row in input_stream]
@@ -0,0 +1,94 @@
1
+ import json
2
+ from typing import Any
3
+
4
+ from pandas import ArrowDtype, DataFrame
5
+ from pyarrow._flight import Ticket
6
+ from tenacity import Retrying, retry_if_result, wait_exponential
7
+
8
+ from graphdatascience.arrow_client.authenticated_flight_client import AuthenticatedArrowClient
9
+ from graphdatascience.arrow_client.v2.api_types import JobIdConfig, JobStatus
10
+ from graphdatascience.arrow_client.v2.data_mapper_utils import deserialize_single
11
+ from graphdatascience.query_runner.progress.progress_bar import TqdmProgressBar
12
+ from graphdatascience.query_runner.termination_flag import TerminationFlag
13
+
14
+ JOB_STATUS_ENDPOINT = "v2/jobs.status"
15
+ RESULTS_SUMMARY_ENDPOINT = "v2/results.summary"
16
+
17
+
18
+ class JobClient:
19
+ def __init__(self, progress_bar_options: dict[str, Any] | None = None):
20
+ self._progress_bar_options = progress_bar_options or {}
21
+
22
+ @staticmethod
23
+ def run_job_and_wait(
24
+ client: AuthenticatedArrowClient, endpoint: str, config: dict[str, Any], show_progress: bool
25
+ ) -> str:
26
+ job_id = JobClient.run_job(client, endpoint, config)
27
+ JobClient().wait_for_job(client, job_id, show_progress=show_progress)
28
+ return job_id
29
+
30
+ @staticmethod
31
+ def run_job(client: AuthenticatedArrowClient, endpoint: str, config: dict[str, Any]) -> str:
32
+ res = client.do_action_with_retry(endpoint, config)
33
+
34
+ single = deserialize_single(res)
35
+ return JobIdConfig(**single).job_id
36
+
37
+ def wait_for_job(
38
+ self,
39
+ client: AuthenticatedArrowClient,
40
+ job_id: str,
41
+ show_progress: bool,
42
+ termination_flag: TerminationFlag | None = None,
43
+ ) -> None:
44
+ progress_bar: TqdmProgressBar | None = None
45
+
46
+ if termination_flag is None:
47
+ termination_flag = TerminationFlag.create()
48
+
49
+ for attempt in Retrying(retry=retry_if_result(lambda _: True), wait=wait_exponential(min=0.1, max=5)):
50
+ with attempt:
51
+ termination_flag.assert_running()
52
+
53
+ arrow_res = client.do_action_with_retry(JOB_STATUS_ENDPOINT, JobIdConfig(jobId=job_id).dump_camel())
54
+ job_status = JobStatus(**deserialize_single(arrow_res))
55
+
56
+ if job_status.succeeded() or job_status.aborted():
57
+ if progress_bar:
58
+ progress_bar.finish(success=job_status.succeeded())
59
+ return
60
+
61
+ if show_progress:
62
+ if progress_bar is None:
63
+ base_task = job_status.base_task()
64
+ if base_task:
65
+ progress_bar = TqdmProgressBar(
66
+ task_name=base_task,
67
+ relative_progress=job_status.progress_percent(),
68
+ bar_options=self._progress_bar_options,
69
+ )
70
+ if progress_bar:
71
+ progress_bar.update(job_status.status, job_status.progress_percent(), job_status.sub_tasks())
72
+
73
+ @staticmethod
74
+ def get_summary(client: AuthenticatedArrowClient, job_id: str) -> dict[str, Any]:
75
+ res = client.do_action_with_retry(RESULTS_SUMMARY_ENDPOINT, JobIdConfig(jobId=job_id).dump_camel())
76
+ return deserialize_single(res)
77
+
78
+ @staticmethod
79
+ def stream_results(client: AuthenticatedArrowClient, graph_name: str, job_id: str) -> DataFrame:
80
+ payload = {
81
+ "graphName": graph_name,
82
+ "jobId": job_id,
83
+ }
84
+
85
+ res = client.do_action_with_retry("v2/results.stream", payload)
86
+ export_job_id = JobIdConfig(**deserialize_single(res)).job_id
87
+
88
+ stream_payload = {"version": "v2", "name": export_job_id, "body": {}}
89
+
90
+ ticket = Ticket(json.dumps(stream_payload).encode("utf-8"))
91
+
92
+ get = client.get_stream(ticket)
93
+ arrow_table = get.read_all()
94
+ return arrow_table.to_pandas(types_mapper=ArrowDtype) # type: ignore
@@ -0,0 +1,52 @@
1
+ import math
2
+ import time
3
+
4
+ from graphdatascience.arrow_client.authenticated_flight_client import AuthenticatedArrowClient
5
+ from graphdatascience.arrow_client.v2.api_types import MutateResult
6
+ from graphdatascience.arrow_client.v2.data_mapper_utils import deserialize_single
7
+
8
+
9
+ class MutationClient:
10
+ MUTATE_ENDPOINT = "v2/results.mutate"
11
+
12
+ @staticmethod
13
+ def mutate_node_property(client: AuthenticatedArrowClient, job_id: str, mutate_property: str) -> MutateResult:
14
+ return MutationClient._mutate(
15
+ client=client,
16
+ job_id=job_id,
17
+ mutate_property=mutate_property,
18
+ )
19
+
20
+ @staticmethod
21
+ def mutate_relationship_property(
22
+ client: AuthenticatedArrowClient,
23
+ job_id: str,
24
+ mutate_relationship_type: str,
25
+ mutate_property: str | None,
26
+ ) -> MutateResult:
27
+ return MutationClient._mutate(
28
+ client=client,
29
+ job_id=job_id,
30
+ mutate_property=mutate_property,
31
+ mutate_relationship_type=mutate_relationship_type,
32
+ )
33
+
34
+ @staticmethod
35
+ def _mutate(
36
+ client: AuthenticatedArrowClient,
37
+ job_id: str,
38
+ mutate_property: str | None = None,
39
+ mutate_relationship_type: str | None = None,
40
+ ) -> MutateResult:
41
+ mutate_config = {
42
+ "jobId": job_id,
43
+ }
44
+ if mutate_relationship_type:
45
+ mutate_config["mutateRelationshipType"] = mutate_relationship_type
46
+ if mutate_property:
47
+ mutate_config["mutateProperty"] = mutate_property
48
+
49
+ start_time = time.time()
50
+ mutate_arrow_res = client.do_action_with_retry(MutationClient.MUTATE_ENDPOINT, mutate_config)
51
+ mutate_millis = math.ceil((time.time() - start_time) * 1000)
52
+ return MutateResult(mutateMillis=mutate_millis, **deserialize_single(mutate_arrow_res))