graphdatascience 1.13__tar.gz → 1.15a1__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.
- {graphdatascience-1.13/graphdatascience.egg-info → graphdatascience-1.15a1}/PKG-INFO +19 -5
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/algo/algo_proc_runner.py +1 -0
- graphdatascience-1.15a1/graphdatascience/call_parameters.py +40 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/graph/base_graph_proc_runner.py +14 -6
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/graph/graph_entity_ops_runner.py +4 -1
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/graph/graph_remote_project_runner.py +2 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/graph/graph_type_check.py +1 -15
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/graph/ogb_loader.py +6 -6
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/query_runner/arrow_endpoint_version.py +1 -8
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/query_runner/arrow_query_runner.py +4 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/query_runner/cypher_graph_constructor.py +3 -2
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/query_runner/gds_arrow_client.py +140 -50
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/query_runner/neo4j_query_runner.py +9 -25
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/query_runner/progress/progress_provider.py +2 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/query_runner/progress/query_progress_logger.py +62 -17
- graphdatascience-1.15a1/graphdatascience/query_runner/progress/query_progress_provider.py +53 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/query_runner/progress/static_progress_provider.py +1 -1
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/query_runner/protocol/project_protocols.py +16 -1
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/query_runner/protocol/write_protocols.py +36 -5
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/query_runner/session_query_runner.py +31 -12
- graphdatascience-1.15a1/graphdatascience/query_runner/termination_flag.py +68 -0
- graphdatascience-1.15a1/graphdatascience/retry_utils/retry_config.py +12 -0
- graphdatascience-1.15a1/graphdatascience/retry_utils/retry_utils.py +20 -0
- graphdatascience-1.15a1/graphdatascience/semantic_version/semantic_version.py +44 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/session/aura_api.py +21 -7
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/session/aura_api_responses.py +2 -2
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/session/dedicated_sessions.py +25 -14
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/session/gds_sessions.py +10 -3
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/session/session_info.py +1 -1
- graphdatascience-1.15a1/graphdatascience/topological_lp/__init__.py +0 -0
- graphdatascience-1.15a1/graphdatascience/utils/__init__.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/version.py +1 -1
- {graphdatascience-1.13 → graphdatascience-1.15a1/graphdatascience.egg-info}/PKG-INFO +19 -5
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience.egg-info/SOURCES.txt +6 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience.egg-info/requires.txt +3 -3
- {graphdatascience-1.13 → graphdatascience-1.15a1}/requirements/base/base.txt +3 -3
- {graphdatascience-1.13 → graphdatascience-1.15a1}/setup.py +1 -0
- graphdatascience-1.13/graphdatascience/call_parameters.py +0 -9
- graphdatascience-1.13/graphdatascience/query_runner/progress/query_progress_provider.py +0 -36
- {graphdatascience-1.13 → graphdatascience-1.15a1}/LICENSE +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/MANIFEST.in +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/README.md +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/__init__.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/algo/__init__.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/algo/algo_endpoints.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/algo/single_mode_algo_endpoints.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/call_builder.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/caller_base.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/endpoints.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/error/__init__.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/error/client_only_endpoint.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/error/cypher_warning_handler.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/error/endpoint_suggester.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/error/gds_not_installed.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/error/illegal_attr_checker.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/error/unable_to_connect.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/error/uncallable_namespace.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/graph/__init__.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/graph/graph_alpha_proc_runner.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/graph/graph_beta_proc_runner.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/graph/graph_create_result.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/graph/graph_cypher_runner.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/graph/graph_endpoints.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/graph/graph_export_runner.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/graph/graph_object.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/graph/graph_proc_runner.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/graph/graph_project_runner.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/graph/graph_remote_proc_runner.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/graph/graph_sample_runner.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/graph/nx_loader.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/graph_data_science.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/ignored_server_endpoints.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/model/__init__.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/model/graphsage_model.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/model/link_prediction_model.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/model/model.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/model/model_alpha_proc_runner.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/model/model_beta_proc_runner.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/model/model_endpoints.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/model/model_proc_runner.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/model/model_resolver.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/model/node_classification_model.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/model/node_regression_model.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/model/pipeline_model.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/model/simple_rel_embedding_model.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/pipeline/__init__.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/pipeline/classification_training_pipeline.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/pipeline/lp_pipeline_create_runner.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/pipeline/lp_training_pipeline.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/pipeline/nc_pipeline_create_runner.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/pipeline/nc_training_pipeline.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/pipeline/nr_pipeline_create_runner.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/pipeline/nr_training_pipeline.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/pipeline/pipeline_alpha_proc_runner.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/pipeline/pipeline_beta_proc_runner.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/pipeline/pipeline_endpoints.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/pipeline/pipeline_proc_runner.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/pipeline/training_pipeline.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/py.typed +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/query_runner/__init__.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/query_runner/arrow_graph_constructor.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/query_runner/arrow_info.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/query_runner/graph_constructor.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/query_runner/progress/__init__.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/query_runner/protocol/__init__.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/query_runner/protocol/status.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/query_runner/query_runner.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/resources/__init__.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/resources/cora/__init__.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/resources/cora/cora_nodes.parquet.gzip +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/resources/cora/cora_rels.parquet.gzip +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/resources/cora/serialize_cora.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/resources/imdb/__init__.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/resources/imdb/imdb_acted_in.parquet.gzip +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/resources/imdb/imdb_actors.parquet.gzip +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/resources/imdb/imdb_directed_in.parquet.gzip +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/resources/imdb/imdb_directors.parquet.gzip +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/resources/imdb/imdb_movies_with_genre.parquet.gzip +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/resources/imdb/imdb_movies_without_genre.parquet.gzip +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/resources/imdb/serialize_imdb.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/resources/karate/__init__.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/resources/karate/karate_club.parquet.gzip +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/resources/lastfm/__init__.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/resources/lastfm/artist_nodes.parquet.gzip +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/resources/lastfm/serialize_lastfm.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/resources/lastfm/user_friend_df_directed.parquet.gzip +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/resources/lastfm/user_listen_artist_rels.parquet.gzip +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/resources/lastfm/user_nodes.parquet.gzip +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/resources/lastfm/user_tag_artist_rels.parquet.gzip +0 -0
- {graphdatascience-1.13/graphdatascience/server_version → graphdatascience-1.15a1/graphdatascience/retry_utils}/__init__.py +0 -0
- {graphdatascience-1.13/graphdatascience/session/dbms → graphdatascience-1.15a1/graphdatascience/semantic_version}/__init__.py +0 -0
- {graphdatascience-1.13/graphdatascience/system → graphdatascience-1.15a1/graphdatascience/server_version}/__init__.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/server_version/compatible_with.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/server_version/server_version.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/session/__init__.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/session/algorithm_category.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/session/aura_graph_data_science.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/session/aurads_sessions.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/session/cloud_location.py +0 -0
- {graphdatascience-1.13/graphdatascience/topological_lp → graphdatascience-1.15a1/graphdatascience/session/dbms}/__init__.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/session/dbms/protocol_resolver.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/session/dbms/protocol_version.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/session/dbms_connection_info.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/session/region_suggester.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/session/session_sizes.py +0 -0
- {graphdatascience-1.13/graphdatascience/utils → graphdatascience-1.15a1/graphdatascience/system}/__init__.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/system/config_endpoints.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/system/system_endpoints.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/topological_lp/topological_lp_alpha_runner.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/topological_lp/topological_lp_endpoints.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/utils/direct_util_endpoints.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/utils/util_node_property_func_runner.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/utils/util_proc_runner.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/utils/util_remote_proc_runner.py +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience.egg-info/dependency_links.txt +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience.egg-info/not-zip-safe +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience.egg-info/top_level.txt +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/pyproject.toml +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/requirements/base/networkx.txt +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/requirements/base/ogb.txt +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/requirements/base/rust-ext.txt +0 -0
- {graphdatascience-1.13 → graphdatascience-1.15a1}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: graphdatascience
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.15a1
|
|
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
|
|
@@ -20,6 +20,7 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.10
|
|
21
21
|
Classifier: Programming Language :: Python :: 3.11
|
|
22
22
|
Classifier: Programming Language :: Python :: 3.12
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
23
24
|
Classifier: Topic :: Database
|
|
24
25
|
Classifier: Topic :: Scientific/Engineering
|
|
25
26
|
Classifier: Topic :: Software Development
|
|
@@ -27,11 +28,11 @@ Classifier: Typing :: Typed
|
|
|
27
28
|
Requires-Python: >=3.9
|
|
28
29
|
Description-Content-Type: text/markdown
|
|
29
30
|
License-File: LICENSE
|
|
30
|
-
Requires-Dist: multimethod<
|
|
31
|
+
Requires-Dist: multimethod<3.0,>=1.0
|
|
31
32
|
Requires-Dist: neo4j<6.0,>=4.4.12
|
|
32
|
-
Requires-Dist: numpy<2.
|
|
33
|
+
Requires-Dist: numpy<2.3
|
|
33
34
|
Requires-Dist: pandas<3.0,>=1.0
|
|
34
|
-
Requires-Dist: pyarrow<
|
|
35
|
+
Requires-Dist: pyarrow<20.0,>=16.0
|
|
35
36
|
Requires-Dist: textdistance<5.0,>=4.0
|
|
36
37
|
Requires-Dist: tqdm<5.0,>=4.0
|
|
37
38
|
Requires-Dist: typing-extensions<5.0,>=4.0
|
|
@@ -43,6 +44,19 @@ Provides-Extra: networkx
|
|
|
43
44
|
Requires-Dist: networkx<4.0,>=2.0; extra == "networkx"
|
|
44
45
|
Provides-Extra: rust-ext
|
|
45
46
|
Requires-Dist: neo4j-rust-ext<6.0,>=4.4.12; extra == "rust-ext"
|
|
47
|
+
Dynamic: author
|
|
48
|
+
Dynamic: author-email
|
|
49
|
+
Dynamic: classifier
|
|
50
|
+
Dynamic: description
|
|
51
|
+
Dynamic: description-content-type
|
|
52
|
+
Dynamic: home-page
|
|
53
|
+
Dynamic: license
|
|
54
|
+
Dynamic: license-file
|
|
55
|
+
Dynamic: project-url
|
|
56
|
+
Dynamic: provides-extra
|
|
57
|
+
Dynamic: requires-dist
|
|
58
|
+
Dynamic: requires-python
|
|
59
|
+
Dynamic: summary
|
|
46
60
|
|
|
47
61
|
# Neo4j Graph Data Science Client
|
|
48
62
|
|
|
@@ -14,6 +14,7 @@ class AlgoProcRunner(IllegalAttrChecker, ABC):
|
|
|
14
14
|
@graph_type_check
|
|
15
15
|
def _run_procedure(self, G: Graph, config: dict[str, Any], with_logging: bool = True) -> DataFrame:
|
|
16
16
|
params = CallParameters(graph_name=G.name(), config=config)
|
|
17
|
+
params.ensure_job_id_in_config()
|
|
17
18
|
|
|
18
19
|
return self._query_runner.call_procedure(endpoint=self._namespace, params=params, logging=with_logging)
|
|
19
20
|
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
from collections import OrderedDict
|
|
2
|
+
from typing import Any, Optional
|
|
3
|
+
from uuid import uuid4
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class CallParameters(OrderedDict[str, Any]):
|
|
7
|
+
# since Python 3.6 also initializing through CallParameters(**kwargs) is order preserving
|
|
8
|
+
|
|
9
|
+
def placeholder_str(self) -> str:
|
|
10
|
+
return ", ".join([f"${k}" for k in self.keys()])
|
|
11
|
+
|
|
12
|
+
def get_job_id(self) -> Optional[str]:
|
|
13
|
+
config = self["config"] if "config" in self else {}
|
|
14
|
+
|
|
15
|
+
job_id = None
|
|
16
|
+
if "jobId" in config:
|
|
17
|
+
job_id = config["jobId"]
|
|
18
|
+
|
|
19
|
+
if "job_id" in config:
|
|
20
|
+
job_id = config["job_id"]
|
|
21
|
+
|
|
22
|
+
if job_id is None:
|
|
23
|
+
return None
|
|
24
|
+
|
|
25
|
+
return str(job_id)
|
|
26
|
+
|
|
27
|
+
def ensure_job_id_in_config(self) -> str:
|
|
28
|
+
"""
|
|
29
|
+
Ensure that a job id is present in the `config` parameter. If not, generate a new one.
|
|
30
|
+
This enables the client to check on the progress later on.
|
|
31
|
+
"""
|
|
32
|
+
config = self.get("config")
|
|
33
|
+
|
|
34
|
+
assert config is not None, "config is not set in the parameters. This method should not be called."
|
|
35
|
+
|
|
36
|
+
job_id = self.get_job_id()
|
|
37
|
+
if job_id is None:
|
|
38
|
+
job_id = str(uuid4())
|
|
39
|
+
config["jobId"] = job_id
|
|
40
|
+
return job_id
|
{graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/graph/base_graph_proc_runner.py
RENAMED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
1
3
|
import os
|
|
2
4
|
import pathlib
|
|
3
5
|
import warnings
|
|
@@ -31,7 +33,6 @@ from .graph_sample_runner import GraphSampleRunner
|
|
|
31
33
|
from .graph_type_check import (
|
|
32
34
|
from_graph_type_check,
|
|
33
35
|
graph_type_check,
|
|
34
|
-
graph_type_check_optional,
|
|
35
36
|
)
|
|
36
37
|
from .ogb_loader import OGBLLoader, OGBNLoader
|
|
37
38
|
|
|
@@ -237,6 +238,7 @@ class BaseGraphProcRunner(UncallableNamespace, IllegalAttrChecker):
|
|
|
237
238
|
params = CallParameters(
|
|
238
239
|
graph_name=graph_name, node_count=node_count, average_degree=average_degree, config=config
|
|
239
240
|
)
|
|
241
|
+
params.ensure_job_id_in_config()
|
|
240
242
|
|
|
241
243
|
result = self._query_runner.call_procedure(
|
|
242
244
|
endpoint=self._namespace,
|
|
@@ -263,6 +265,8 @@ class BaseGraphProcRunner(UncallableNamespace, IllegalAttrChecker):
|
|
|
263
265
|
relationship_filter=relationship_filter,
|
|
264
266
|
config=config,
|
|
265
267
|
)
|
|
268
|
+
params.ensure_job_id_in_config()
|
|
269
|
+
|
|
266
270
|
result = self._query_runner.call_procedure(
|
|
267
271
|
endpoint=self._namespace,
|
|
268
272
|
logging=True,
|
|
@@ -292,7 +296,7 @@ class BaseGraphProcRunner(UncallableNamespace, IllegalAttrChecker):
|
|
|
292
296
|
failIfMissing: bool = False,
|
|
293
297
|
dbName: str = "",
|
|
294
298
|
username: Optional[str] = None,
|
|
295
|
-
) -> Optional[
|
|
299
|
+
) -> Optional[Series[Any]]:
|
|
296
300
|
self._namespace += ".drop"
|
|
297
301
|
|
|
298
302
|
if isinstance(graph, Graph):
|
|
@@ -315,7 +319,7 @@ class BaseGraphProcRunner(UncallableNamespace, IllegalAttrChecker):
|
|
|
315
319
|
|
|
316
320
|
return None
|
|
317
321
|
|
|
318
|
-
def exists(self, graph_name: str) ->
|
|
322
|
+
def exists(self, graph_name: str) -> Series[Any]:
|
|
319
323
|
self._namespace += ".exists"
|
|
320
324
|
result = self._query_runner.call_procedure(
|
|
321
325
|
endpoint=self._namespace,
|
|
@@ -324,13 +328,17 @@ class BaseGraphProcRunner(UncallableNamespace, IllegalAttrChecker):
|
|
|
324
328
|
|
|
325
329
|
return result.squeeze() # type: ignore
|
|
326
330
|
|
|
327
|
-
|
|
328
|
-
def list(self, G: Optional[Graph] = None) -> DataFrame:
|
|
331
|
+
def list(self, G: Optional[Union[Graph, str]] = None) -> DataFrame:
|
|
329
332
|
self._namespace += ".list"
|
|
330
333
|
|
|
334
|
+
if isinstance(G, Graph):
|
|
335
|
+
graph_name = G.name()
|
|
336
|
+
elif isinstance(G, str):
|
|
337
|
+
graph_name = G
|
|
338
|
+
|
|
331
339
|
params = CallParameters()
|
|
332
340
|
if G:
|
|
333
|
-
params["graph_name"] =
|
|
341
|
+
params["graph_name"] = graph_name
|
|
334
342
|
|
|
335
343
|
return self._query_runner.call_procedure(
|
|
336
344
|
endpoint=self._namespace,
|
{graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/graph/graph_entity_ops_runner.py
RENAMED
|
@@ -101,7 +101,7 @@ class GraphNodePropertiesRunner(GraphEntityOpsBaseRunner):
|
|
|
101
101
|
def stream(
|
|
102
102
|
self,
|
|
103
103
|
G: Graph,
|
|
104
|
-
node_properties: list[str],
|
|
104
|
+
node_properties: Union[str, list[str]],
|
|
105
105
|
node_labels: Strings = ["*"],
|
|
106
106
|
separate_property_columns: bool = False,
|
|
107
107
|
db_node_properties: list[str] = [],
|
|
@@ -109,6 +109,9 @@ class GraphNodePropertiesRunner(GraphEntityOpsBaseRunner):
|
|
|
109
109
|
) -> DataFrame:
|
|
110
110
|
self._namespace += ".stream"
|
|
111
111
|
|
|
112
|
+
if isinstance(node_properties, str):
|
|
113
|
+
node_properties = [node_properties]
|
|
114
|
+
|
|
112
115
|
# find if list contain duplicates
|
|
113
116
|
if len(set(node_properties)) != len(node_properties):
|
|
114
117
|
raise ValueError(f"The provided node_properties contain duplicate property names: `{node_properties}`.")
|
|
@@ -22,6 +22,7 @@ class GraphProjectRemoteRunner(IllegalAttrChecker):
|
|
|
22
22
|
undirected_relationship_types: Optional[list[str]] = None,
|
|
23
23
|
inverse_indexed_relationship_types: Optional[list[str]] = None,
|
|
24
24
|
batch_size: Optional[int] = None,
|
|
25
|
+
logging: bool = True,
|
|
25
26
|
) -> GraphCreateResult:
|
|
26
27
|
if inverse_indexed_relationship_types is None:
|
|
27
28
|
inverse_indexed_relationship_types = []
|
|
@@ -45,5 +46,6 @@ class GraphProjectRemoteRunner(IllegalAttrChecker):
|
|
|
45
46
|
result = self._query_runner.call_procedure(
|
|
46
47
|
endpoint=SessionQueryRunner.GDS_REMOTE_PROJECTION_PROC_NAME,
|
|
47
48
|
params=params,
|
|
49
|
+
logging=True,
|
|
48
50
|
).squeeze()
|
|
49
51
|
return GraphCreateResult(Graph(graph_name, self._query_runner), result)
|
{graphdatascience-1.13 → graphdatascience-1.15a1}/graphdatascience/graph/graph_type_check.py
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from functools import wraps
|
|
2
|
-
from typing import Any, Callable,
|
|
2
|
+
from typing import Any, Callable, TypeVar, cast
|
|
3
3
|
|
|
4
4
|
from .graph_object import Graph
|
|
5
5
|
|
|
@@ -20,20 +20,6 @@ def graph_type_check(func: F) -> F:
|
|
|
20
20
|
return cast(F, wrapper)
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
def graph_type_check_optional(func: F) -> F:
|
|
24
|
-
@wraps(func)
|
|
25
|
-
def wrapper(self: Any, G: Optional[Graph] = None, *args: Any, **kwargs: Any) -> Any:
|
|
26
|
-
if isinstance(G, str):
|
|
27
|
-
raise TypeError(
|
|
28
|
-
f"The parameter 'G' takes a `Graph` object, but received string '{G}'. "
|
|
29
|
-
"To resolve a graph name string into a `Graph` object, please use `gds.graph.get`"
|
|
30
|
-
)
|
|
31
|
-
|
|
32
|
-
return func(self, G, *args, **kwargs)
|
|
33
|
-
|
|
34
|
-
return cast(F, wrapper)
|
|
35
|
-
|
|
36
|
-
|
|
37
23
|
def from_graph_type_check(func: F) -> F:
|
|
38
24
|
@wraps(func)
|
|
39
25
|
def wrapper(self: Any, graph_name: str, from_G: Graph, *args: Any, **kwargs: Any) -> Any:
|
|
@@ -108,12 +108,12 @@ class OGBNLoader(OGBLoader):
|
|
|
108
108
|
"nodeId": list(range(node_count)),
|
|
109
109
|
}
|
|
110
110
|
if "node_feat" in graph and graph["node_feat"] is not None:
|
|
111
|
-
node_dict["features"] = graph["node_feat"].tolist()
|
|
111
|
+
node_dict["features"] = graph["node_feat"].tolist() # type: ignore
|
|
112
112
|
|
|
113
113
|
if len(dataset.labels[0]) == 1:
|
|
114
114
|
node_dict["classLabel"] = [cl[0] for cl in dataset.labels]
|
|
115
115
|
else:
|
|
116
|
-
node_dict["classLabel"] = dataset.labels.tolist()
|
|
116
|
+
node_dict["classLabel"] = dataset.labels.tolist() # type: ignore
|
|
117
117
|
|
|
118
118
|
split = dataset.get_idx_split()
|
|
119
119
|
node_labels = ["Train" for _ in range(node_count)]
|
|
@@ -170,13 +170,13 @@ class OGBNLoader(OGBLoader):
|
|
|
170
170
|
}
|
|
171
171
|
|
|
172
172
|
if node_label in node_features:
|
|
173
|
-
node_dict["features"] = node_features[node_label].tolist()
|
|
173
|
+
node_dict["features"] = node_features[node_label].tolist() # type: ignore
|
|
174
174
|
|
|
175
175
|
if node_label in class_labels:
|
|
176
176
|
if len(class_labels[node_label]) == 1:
|
|
177
177
|
node_dict["classLabel"] = [cl[0] for cl in class_labels[node_label]]
|
|
178
178
|
else:
|
|
179
|
-
node_dict["classLabel"] = class_labels[node_label].tolist()
|
|
179
|
+
node_dict["classLabel"] = class_labels[node_label].tolist() # type: ignore
|
|
180
180
|
|
|
181
181
|
node_id_offsets[node_label] = current_offset
|
|
182
182
|
current_offset += node_count
|
|
@@ -243,7 +243,7 @@ class OGBLLoader(OGBLoader):
|
|
|
243
243
|
"labels": "N",
|
|
244
244
|
}
|
|
245
245
|
if "node_feat" in graph and graph["node_feat"] is not None:
|
|
246
|
-
node_dict["features"] = graph["node_feat"].tolist()
|
|
246
|
+
node_dict["features"] = graph["node_feat"].tolist() # type: ignore
|
|
247
247
|
nodes = pd.DataFrame(node_dict)
|
|
248
248
|
|
|
249
249
|
self._logger.info("Preparing relationship data for transfer to server...")
|
|
@@ -283,7 +283,7 @@ class OGBLLoader(OGBLoader):
|
|
|
283
283
|
}
|
|
284
284
|
|
|
285
285
|
if node_label in node_features:
|
|
286
|
-
node_dict["features"] = node_features[node_label].tolist()
|
|
286
|
+
node_dict["features"] = node_features[node_label].tolist() # type: ignore
|
|
287
287
|
|
|
288
288
|
node_id_offsets[node_label] = current_offset
|
|
289
289
|
current_offset += node_count
|
|
@@ -4,8 +4,8 @@ from enum import Enum
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
class ArrowEndpointVersion(Enum):
|
|
7
|
-
ALPHA = ""
|
|
8
7
|
V1 = "v1/"
|
|
8
|
+
V2 = "v2/"
|
|
9
9
|
|
|
10
10
|
def version(self) -> str:
|
|
11
11
|
return self._name_.lower()
|
|
@@ -15,17 +15,10 @@ class ArrowEndpointVersion(Enum):
|
|
|
15
15
|
|
|
16
16
|
@staticmethod
|
|
17
17
|
def from_arrow_info(supported_arrow_versions: list[str]) -> ArrowEndpointVersion:
|
|
18
|
-
# Fallback for pre 2.6.0 servers that do not support versions
|
|
19
|
-
if len(supported_arrow_versions) == 0:
|
|
20
|
-
return ArrowEndpointVersion.ALPHA
|
|
21
|
-
|
|
22
18
|
# If the server supports versioned endpoints, we try v1 first
|
|
23
19
|
if ArrowEndpointVersion.V1.version() in supported_arrow_versions:
|
|
24
20
|
return ArrowEndpointVersion.V1
|
|
25
21
|
|
|
26
|
-
if ArrowEndpointVersion.ALPHA.version() in supported_arrow_versions:
|
|
27
|
-
return ArrowEndpointVersion.ALPHA
|
|
28
|
-
|
|
29
22
|
raise UnsupportedArrowEndpointVersion(supported_arrow_versions)
|
|
30
23
|
|
|
31
24
|
|
|
@@ -5,6 +5,8 @@ from typing import Any, Optional
|
|
|
5
5
|
|
|
6
6
|
from pandas import DataFrame
|
|
7
7
|
|
|
8
|
+
from graphdatascience.retry_utils.retry_config import RetryConfig
|
|
9
|
+
|
|
8
10
|
from ..call_parameters import CallParameters
|
|
9
11
|
from ..query_runner.arrow_info import ArrowInfo
|
|
10
12
|
from ..server_version.server_version import ServerVersion
|
|
@@ -24,6 +26,7 @@ class ArrowQueryRunner(QueryRunner):
|
|
|
24
26
|
disable_server_verification: bool = False,
|
|
25
27
|
tls_root_certs: Optional[bytes] = None,
|
|
26
28
|
connection_string_override: Optional[str] = None,
|
|
29
|
+
retry_config: Optional[RetryConfig] = None,
|
|
27
30
|
) -> ArrowQueryRunner:
|
|
28
31
|
if not arrow_info.enabled:
|
|
29
32
|
raise ValueError("Arrow is not enabled on the server")
|
|
@@ -35,6 +38,7 @@ class ArrowQueryRunner(QueryRunner):
|
|
|
35
38
|
disable_server_verification,
|
|
36
39
|
tls_root_certs,
|
|
37
40
|
connection_string_override,
|
|
41
|
+
retry_config=retry_config,
|
|
38
42
|
)
|
|
39
43
|
|
|
40
44
|
return ArrowQueryRunner(gds_arrow_client, fallback_query_runner, fallback_query_runner.server_version())
|
|
@@ -386,7 +386,8 @@ class CypherGraphConstructor(GraphConstructor):
|
|
|
386
386
|
)
|
|
387
387
|
|
|
388
388
|
def _node_query(self, node_df: DataFrame) -> tuple[str, list[list[Any]]]:
|
|
389
|
-
|
|
389
|
+
# ignore type as tolist return depends on number of dimensions)
|
|
390
|
+
node_list: list[list[Any]] = node_df.values.tolist() # type: ignore
|
|
390
391
|
node_columns = list(node_df.columns)
|
|
391
392
|
node_id_index = node_columns.index("nodeId")
|
|
392
393
|
|
|
@@ -411,7 +412,7 @@ class CypherGraphConstructor(GraphConstructor):
|
|
|
411
412
|
return f"UNWIND $nodes as node RETURN node[{node_id_index}] as id{label_query}{property_query}", node_list
|
|
412
413
|
|
|
413
414
|
def _relationship_query(self, rel_df: DataFrame) -> tuple[str, list[list[Any]]]:
|
|
414
|
-
rel_list = rel_df.values.tolist()
|
|
415
|
+
rel_list: list[list[Any]] = rel_df.values.tolist() # type: ignore
|
|
415
416
|
rel_columns = list(rel_df.columns)
|
|
416
417
|
source_id_index = rel_columns.index("sourceNodeId")
|
|
417
418
|
target_id_index = rel_columns.index("targetNodeId")
|